Questions tagged [semi-join]
37 questions
0
votes
2 answers
MySQL subquery IN multiple values
I have 2 tables :
Table reports
id | name
-------------
1 | test 1
2 | test 2
3 | test 3
Table reports_access
id_table | group_id
-----------------------
1 | 1
1 | 2
1 | 3
1 | 4
2 | …

Vincent Decaux
- 9,857
- 6
- 56
- 84
0
votes
1 answer
R: Compare columns in two tables for missing values and produce True False in a new column
I have email data that I'd like to compare. To gather the data I had to pull sends, deliveries, opens, etc. from separate tables, so I essentially have 5 data frames with identical information, but the send table has 100% of user ID's that were…

Gopher_Gold25
- 11
- 1
0
votes
4 answers
R merge multiple files into 1 dataframe and keep all values
I have 6 multiple files, each having only 1 column of names. I want to read all these files and combine them in 1 dataframe so that it looks like this:
file1 file2 file3 file4 file5 file6
adam adam adam adam adam adam
Roy NA …

Newbie
- 411
- 5
- 18
0
votes
1 answer
MySQL complex semi-join without group by
Summary
I am looking for a semi-join(ish) query that selects a number of customers and joins their most recent data from other tables.
At a later time, I wish to directly append conditions to the end of the query: WHERE c.id IN (1,2,3)
Problem
As…

Timo
- 7,992
- 4
- 49
- 67
0
votes
2 answers
Mysql subquery returning null
When I execute the query below, it returns NULL.
SELECT SUM(t.coupon_quantity)
FROM transaction t, coupon c, supplier s
WHERE MONTH(date_entered) = MONTH(CURDATE())
AND YEAR(date_entered) = YEAR(CURDATE())
AND t.coupon_id = c.id
AND…
-1
votes
1 answer
Is this a MySQL bug?
I was running this query against sakila database on MySQL 8.0.17:
select * from film _1 where (
exists (
select * from film_actor where (
select * from (
select film_id=_1.film_id and actor_id=1
)…

Jack Lu
- 139
- 2
- 12
-1
votes
2 answers
Semi-join vs Subqueries
What is the difference between semi-joins and a subquery? I am currently taking a course on this on DataCamp and i'm having a hard time making a distinction between the two.
Thanks in advance.

DBZ92
- 11
- 2