How are we doing? Please help us improve Stack Overflow. Take our short survey

Questions tagged [intersect]

The SQL intersect operator returns rows that are common between two tables without returning duplicate records.

intersect
Filter by
Sorted by
Tagged with
2 votes
1 answer
60 views

Update a polygon that have intersections in two or more polygons

I have 2 tables, table #1 contains a square polygon/grid, table #2 contains the polygon of an administrative area. I updated table #1 with data from table #2 with the ST_Intersects() function. Here's ...
Hermawan Wiwid's user avatar
2 votes
3 answers
88 views

count values in one dataframe in another dataframe

Assume I have a dataframe like this: df <- data.frame( D = c('A', 'B', 'C'), Q = c('asd', 'reg', 'rt'), id = I(list(c(124, 532, 78), c(1, 3, 532), c(2, 3, 78, 124, 1))) ) and another one ...
Caterina's user avatar
  • 935
0 votes
1 answer
46 views

c# Some elements not show at the list intersection

I am trying to get the common elementes of two lists. The example is as follows: var control = "F, H, S, W".Split(',').ToList(); var drives = new List<string> {"C", "D&...
Johnny Wind's user avatar
0 votes
2 answers
81 views

Looping though list rows and pulling column data to populate a schedule on another worksheet

I need to iterate though each row within a table ("DataTable") and leverage different data points across columns to: Locate worksheet.name ("A:A" / "Quarter Schedule"); ...
jmsmtrvn's user avatar
0 votes
1 answer
26 views

Power Bi - Intersect function to return qty

Consider the raw data below opptyID Account ID Product Close Start End Qty 12 1 A 01-Jan-23 01-Jan-23 01-Feb-23 10.00 13 1 A 01-Feb-23 01-Feb-23 10-Sep-23 2.00 17 2 A 01-Feb-23 01-Feb-23 10-Sep-23 ...
Shalabh A's user avatar
0 votes
1 answer
47 views

Calculating Time Difference between two rows while resetting for a group - Hot, and Thank you Community

In my case, I have different Partners (ENCOUNTER_ID). Each one can have one or multiple assessments. I need to calculate the time difference between each each one of their assessments. With time ...
Edward Castro's user avatar
1 vote
0 answers
21 views

In Typescript, how to check that if a key is present in an object, so should another one [duplicate]

This seems really silly and basic but for some reason I can't get it to work. I want a type for a function argument to be an object that always has a key a of type string. This object can also have a ...
Max Lascombe's user avatar
0 votes
1 answer
181 views

Crop a polygon to a bounding box without losing box edge

I am trying to crop polygons to a box The function I got so far is: import numpy as np def crop_polygon(x, y, xmin, xmax, ymin, ymax): # Create a mask to identify points inside the bounding box ...
Terranigmus's user avatar
0 votes
3 answers
251 views

Excel SUMIF formula for cells that fall in column has "Total" and row has "Commissionable" and and row has Non-Commissionable

I'm looking for some help in writing a SUMIF formula or a better alternative. The idea is the Grand Total in cell I20 will automatically sum up cells that intersect rows with Non-Commissionable in it ...
cpht's user avatar
  • 77
0 votes
2 answers
77 views

How to do arrange data of 2 tables in descending order and then intersect two tables?

Question: Check which subject is among the top 3 scoring subjects for Rahul in Term-1 and Term-2 using mssql? If I use order by before intersect the code is not working. But if I don't sort data of ...
rereer's user avatar
  • 15
0 votes
1 answer
208 views

Redshift SQL array intersect

Is there an array intersect function in Redshift, or a good way it can be done? For example in Snowflake it is: SELECT array_intersection(ARRAY_CONSTRUCT('A', 'B'), ARRAY_CONSTRUCT('B', 'C')); ...
Deisou's user avatar
  • 3
0 votes
1 answer
53 views

How to automatize comparison of values in two columns of two different data.frames in r?

I'm trying to automatize the following function for all columns of two data frames. I have the data.frames position_sc and position_hit. Both have 18 columns (each column represents a subject ("...
Tena's user avatar
  • 3
0 votes
0 answers
4 views

Intersect method does not appear to work with a Data Entry Form

The following code works as expected when I enter data directly into the worksheet. However, when I enter data using a form the code does not work. What am I missing here? Set KeyCells = Range("...
Ray G.'s user avatar
  • 11
-1 votes
2 answers
88 views

SQL Intersection with group by a column values

I want to intersect between values of one column based on another column. I mean if I have three different values in Id column, I want the values of LineGroupBy column to be assumed as one group(Id=1) ...
Vajihe Jami's user avatar
-1 votes
2 answers
126 views

Is it the right way to use 2 IN in one SQL-query instead of INTERSECT?

I have a product filter based on data from multiple tables. I make query using IN 2 and more times in one query. This works great and only selects products that have and needed attributes and needed ...
SergeTkach's user avatar
-1 votes
1 answer
164 views

How to find intersection point from several line in a single plot in R?

Sample code: m=matrix(1:54,nrow=9) l=1:6 plot(l,m[1,],type="l",xlim=1:6) lines(l,m[2,]) lines(l,m[3,]) legend(2,3,legend=c("m1","m2","m3"))) Now, how can I ...
user avatar
0 votes
0 answers
61 views

Python script to check if ellipse and rectangle intersect

I need a python script to check if ellipse and rectangle intersect. If they intersect plot the ellipse in green color else plot in red color. I am using matplotlib's path.intersects_bbox and path....
Karthik's user avatar
0 votes
1 answer
384 views

Spotfire on function - Create new calculated column with difference between different table rows

I would like to calculate a difference in value between a line that is from column D (end date) with the line below but wuth data form column C (start date). Tried the following custom expression but ...
Daniel Leite's user avatar
1 vote
1 answer
241 views

LINQ Group By and Intersection between groups C#

I have the following list into C#: table_schema | table_name | field_name | field_type public tableA fieldA character varying public tableA fieldB timestamp ...
Stavros Koureas's user avatar
0 votes
1 answer
206 views

Python Intersection function doesn't work when lines share just one common endpoint

I have these endpoints for function for line 1 (1,1) (4,1) line 2 (4,1) (8,1). Output is empty because div becomes 0 , how to handle this case in this function so that they are not treated as ...
amit's user avatar
  • 61
0 votes
2 answers
194 views

Use jq to remove key/value pairs based on other file

I have 2 json files containing translations for my app: en-US.json: { "car": "car", "bike": "bike", "tree": "tree", } nl-NL....
Rogier's user avatar
  • 540
3 votes
2 answers
112 views

Intersect on HashSet results in compile error

I've been trying to write a program, in which I want to use the intersection of two HashSets. Therefore I wrote the following code (for test purposes): HashSet<int> test1 = new HashSet<int>...
Lisa's user avatar
  • 33
2 votes
4 answers
114 views

Microsoft Excel VBA Intersect with Rename Sheet

I'm trying to change the name of a sheet after it is created under and Intersect method. The code I have below give Error 424. The code works when only creating a new sheet. Private Sub ...
Frank's user avatar
  • 61
1 vote
2 answers
78 views

C# Intersect Two Dictionaries and Store The Key and The Two Values in a List

I want to intersect the 2 dictionaries, but I am not sure how to store historicalHashTags[x] too, I managed to store only the key and value of 1 dictionary. var intersectedHashTags = currentHashTags....
bob mason's user avatar
  • 805
1 vote
1 answer
162 views

Auto cell update with use of intersect

So basically I have a column in my spreadsheet that tracks the status of bearing conditions. 800+ bearings spread across 8 or so sheets (different areas of a facility) and will continue to increase in ...
Drew Killingley's user avatar
0 votes
0 answers
132 views

How to automatically update the date in cell in one columns when a change is made to a cell in a another column

So basically I have a column in my spreadsheet that tracks the status of bearing conditions. 800+ bearings spread across 8 or so sheets (different areas of a facility) and will continue to increase in ...
Drew Killingley's user avatar
0 votes
1 answer
316 views

Filtering JSON Array

Any guidance or reference is appreciated. Using javascript's (map reduce and filter), I am trying to get a collection of all available rooms across multiple vendors in the given JSON array. The logic ...
imc's user avatar
  • 1
0 votes
0 answers
49 views

How to compare plain array with array of object in JavaScript

I wanted the result like "11" only , i wanted to compare array of object with plain array whenever am trying to use filter it's show blank result. wanted to avoid map or loops. if that ...
Harman's user avatar
  • 539
3 votes
1 answer
61 views

How can do subscription between two SELECT set?

SELECT field1 FROM tbl1 WHERE conditionsx ...? SELECT field2 FROM tbl2 WHERE conditionsy I Want return same below↓ What is superscription between two SELECT results.
parmer_110's user avatar
0 votes
1 answer
711 views

C# LINQ Intersect 2 Different Type Lists and Return one Type

I am trying to find common rows in 2 lists as follows: public class ListA { public string Id { get; set; } public string Name { get; set; } } List<ListA> listA = new List<...
bob mason's user avatar
  • 805
0 votes
1 answer
45 views

VBA Error with intersect over 2 separate columns

I have an issue where when using the following line of code for a Worksheet_Change sub - If Intersect(Target, ActiveSheet.Columns(7)) Or Intersect(Target, ActiveSheet.Columns(11)) Is Nothing Then ...
Drawleeh's user avatar
  • 259
0 votes
1 answer
39 views

Code that finds list intersection (using mapply) works for same values but not others

I am trying to find the intersect between two list columns in a data.table object which I import into R. I replicate the data.table below, with the exact same values: DT_1 <- data.table( ego = as....
PaulaSpinola's user avatar
0 votes
1 answer
101 views

bash loop file in one folder against all files in another folder

I am trying to do a (bedtools) intersect. Anyone see what is wrong with my bash code here? #!/bin/bash dir=$(pwd) query=$dir/query_beds pgs=$dir/pgs_beds for file in $query/*; do bedtools ...
clemaster's user avatar
1 vote
1 answer
121 views

Find the intersection of all combination of list of list

My ultimate goal is to have alluvial plots in R. However, my data is big and is not stored in a way that can be used for direct input, I have: 4 groups (they will be axes of the alluvial plot) In ...
William Wong's user avatar
1 vote
1 answer
36 views

.NET replacing values where keys match

This is a simple question. I have two lists ListA and ListB they are both full of the same type of objects with keys, but everything else (besides key) can be different, the size the values etc..... I ...
DemiGod's user avatar
  • 25
0 votes
1 answer
40 views

Mysql showing data constains two type of animals using intersect

TheAnimals Table : |Aname|Sex |Type|Country|yearOfBirth| cNum | |-----|-----|----|------ |-----------| ---- | |Charly|male|Lion|Kenya|1990|12| |Arthur|male|Bear|France|1980|1| |Chloe|female|Magpie|...
shin gamma's user avatar
1 vote
1 answer
551 views

Excel VBA: Change cell value based on other cell value changed

I am writing the VBA that about change the cell (E19:E24) value if cell D18 value changed and change the cell D18 value if E19: E24 all or anyone cell value changed. I want to fulfil below scenario: ...
Alan Tse's user avatar
0 votes
2 answers
57 views

Filter a 2d array by a static value and a column in another 2d array

I have 2 arrays where they have some common id values, but the keys for these id keys differ slightly. $comps = [ [ 'c_id' => '123', 'status' => 'active' ], [ 'c_id' => '456'...
physicsboy's user avatar
  • 5,994
0 votes
1 answer
76 views

fabricjs Polygon Redundant Area

2https://i.stack.imgur.com/2aZm2.png 1https://codepen.io/1gelistirici/pen/KKRjgoj[enter image description here] // Initiate a Canvas instance var canvas = new fabric.Canvas("canvas")...
CodeInSpace's user avatar
1 vote
1 answer
58 views

Adding value to a cell (within a specified range) populates an adjacent cell

My table has a column for Date & Time where a current timestamp is added, and another column recording the observed Number of Events for that time. I have to fill Number of Events quickly, so need ...
Cameron Schwarz's user avatar
1 vote
1 answer
82 views

SQL Server Geography Data Type - why do two separate Polygons Intersect?

I have two geometry variables and I want to find out if they intersect. My first variable is called @orderBounds2. DECLARE @orderBounds2 geography I set it to a value set @orderBounds2 = ...
AlastairS's user avatar
0 votes
1 answer
58 views

MariaDB - Conjunction-Search in Many-to-Many

I have problems to implement an "and-concatenated" search with many-to-many tables. I tried to present a simple example below. I use MariaDB. I have a table with process. To the process a ...
Phantom's user avatar
  • 668
1 vote
0 answers
2k views

How to properly use intersection observer in Vue? Writing it in onUpdated() correct?

I have an issue using intersect observer with vue3. I want to have the intersect shown and being activated with a v-if. Unfortunately it only works if I write the intersect Observer code in the ...
user1664377's user avatar
0 votes
1 answer
96 views

Calculate a plot and intersect on a curve in an excel chart based on a single value

I have some data that I'm using to plot a curve in excel. It uses a non-linear calculation. The calculation is called the rule of twelfths - it is used to calculate changes in tidal height between a ...
James Davies's user avatar
0 votes
0 answers
62 views

Intersect does not retrieve list as expected

I have two lists, the first one contains a lot of items, and the second one contains one item that also exists on first list. And I was wrote code to check if the first list contains all second list ...
Mahmoud Abdeen's user avatar
-2 votes
1 answer
51 views

how to filter a dataframe column based on intersected values from another column in dataframe

I have two dataframe. I want to filter gene ID from expr_df dataframe based on the intersected values from another data frame gene_Annot.Basically i want to keep genes in expr_df that intersects with ...
Katherin Wright's user avatar
0 votes
1 answer
157 views

Find Intersect of a Vector and List of Vectors

I have a vector of various foods that I need to sort, as follows: myVector <- c("Banana", "Apple", "Spinach", "Lettuce", "Candy", "Soda") ...
Jacob's user avatar
  • 412
1 vote
1 answer
45 views

Apache spark : How deep is the comparison of rows in RDD or DF

I want to understand the behavior of DF.intersect(). so the question came to mind, especially when we have complex Rows having complex fields. (deep tree)
Noureddine Ettalhi's user avatar
1 vote
1 answer
259 views

Looking for an equivalent to INTERSECT ALL in sqlite

I have a database which allows duplicates where the key is a string and the values are URLs. Here's the schema: CREATE TABLE Tags (p_tags TEXT, p_urls LONGVARCHAR); I would like to do a command like ...
Lawrence Berardelli's user avatar
0 votes
1 answer
78 views

SQL sum between dates

I need to sum values in intersect of range dates. sample of source data person item start_date end_date value a apple 08.03.2018 29.03.2018 3 a apple 01.01.2019 08.08.2021 2 a apple 01.01.2019 09....
l_obr's user avatar
  • 29

1
2 3 4 5
13