Questions tagged [intersect]

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

643 questions
1
vote
2 answers

determine whether line is entirely within path2d shape (in java)

I'm looking for the easiest/fastest (computationally) way to determine whether a shape, more specifically a GeneralPath object, contains any given line segment (of type Line2D.Double). GeneralPath has methods to determine whether a point or a…
scaevity
  • 3,991
  • 13
  • 39
  • 54
1
vote
0 answers

How to calculate the overlap between two sets of shape files (.shp)

I would like to calculate the area of overlap between the geographical distribution of 250 prey species and 5000 potential predator species. For each species I have a shape file in .shp format. In the past I've used the following code for a few…
Chris
  • 11
  • 1
1
vote
0 answers

Aggregating Data from same value from different row in Spotfire

I've some clinical data that needs some tricky calculations. Screenshot here I have a column called "LabCode" and another "Days" which is my aggregate data/Measure.The third column is my expected output after the aggregations. The labcode are the…
chukwe
  • 11
  • 2
1
vote
2 answers

Finding common words in Pandas dataframe

I have set of words {'adalah', 'akan', 'akhir', 'algoritme', 'alur', 'antar', 'antisense', 'asam', 'atas', 'atau', 'bahwa', 'bakteriofag', 'baru', 'basa', 'beranggota', 'berdasarkan', 'berikatan', 'berupa', 'pada',...} I tried to…
ohai
  • 183
  • 10
1
vote
1 answer

SQL Intersect not supported in Phoenix , alternative for intersect in phoenix?

I have the following SQL expression: SELECT SS_ITEM_SK AS POP_ITEM_SK FROM (SELECT SS_ITEM_SK FROM (SELECT SS_ITEM_SK,(ITEM_SOLD-ITEM_RETURNED) AS TOT_SOLD_QTY FROM (SELECT SS_ITEM_SK,COUNT(SS_ITEM_SK) AS ITEM_SOLD,COUNT(SR_ITEM_SK) AS…
Khush
  • 13
  • 1
  • 4
1
vote
1 answer

Whats wrong with using 'INTERSECT' in this SQL code

( Select Movie_Name From Theatres Inner Join Movies On Theatre_Movie_ID = Movie_ID AND Showing_Time = '9:00PM' ) INTERSECT ( Select Movie_Name From Movies Where Duration = '2:20' )
1
vote
2 answers

INTERSECT ALL not working on PostgreSQL 11

The PostgreSQL operation INTERSECT ALL does not seem to work. What am I missing? The following query returns just one row containing the value two, but I am expecting two with the value as I am using intersect all. ( (select 1 as z) union all…
1
vote
1 answer

Is my syncfunctions hashCode usage approach correct?

Please read my previous question, because my fear of getting collision when using hashCode for strings ! Previous question I having a database table with items in a repo, and a "incoming" function with items from a model that should sync - to the…
Niklas
  • 1,753
  • 4
  • 16
  • 35
1
vote
3 answers

Comparing entries of 2 dictionaries by their values but then return their respective keys?

I have 2 dictionaries of type Dictionary, first int being their key, (int, int) being their values. Using var intersections = dict1.Values.Intersect(dict2.Values); I can compare values and return an IEnumerable of all values that…
SebC
  • 13
  • 2
1
vote
2 answers

Emulate an Intersect in MySQL w/ multiple tables and Join

I need to emulate an Intersect query in MySQL. SELECT c.cust_code, cust_fname, cust_lname FROM lgcustomer c JOIN lginvoice i ON c.cust_code = i.cust_code WHERE employee_id = 83649 INTERSECT SELECT c.cust_code,…
1
vote
1 answer

sdo_relate giving a wrong query result

I have two geometry in two feature class ,one named "HY90299 " and the other named "hyboxsdo " ,the two geometry do not intersect . but when i run a spatial query in oralce , "select sdo_relate(t.shape,g.shape ,'mask=ANYINTERACT') from HY90299…
1
vote
7 answers

How do I create a special case Intersect clause in SQL?

I need a set of values, only when they are available in two different select statements, so I used "intersect" (select statement 1) intersect (select statement 2) but I want all the values from one of the select statements when the other select…
Ardis thrash
  • 164
  • 9
1
vote
2 answers

Image intersect

How do I know when my two images are intersecting?
Little Helper
  • 2,419
  • 9
  • 37
  • 67
1
vote
2 answers

Intersection in DB2 using INTERSECT

I have a query in DB2 that I need intersection on. SELECT * FROM records where id = 1 intersect SELECT * FROM records where id = 2 Now this size of ids can grow dynamically, do we have anything in DB2 that can take the list of ids as the…
Danyal Sandeelo
  • 12,196
  • 10
  • 47
  • 78
1
vote
1 answer

Items with both properties contained in a list

I have a list of objects X (with the name x) with properties a and b of the same type Location. I also have a list of locations y. I need to find all objects in x for which a AND b are contained in the list y. I can do it with loops and Wheres but…
Antiohia
  • 1,142
  • 13
  • 37