43,788 questions
-4
votes
0
answers
45
views
Why is LEFT JOIN skipping identical VARCHAR barcode values in SQL Workbench? [closed]
I have two tables in SQL Workbench, both
sales
Barcode(primary key for each sale)
other sales-related columns…
products
Barcode
product_name, price, etc.
I'm running a simple LEFT JOIN to append ...
2
votes
3
answers
68
views
Get SQL to get all records from a usertable and those matching uids from second table or return null [closed]
I have two tables, usertable and namedown.
usertable contains all users uids in the system, namedown contains list of users (and their uids) and if they are able to play in specific match (...
2
votes
3
answers
77
views
Find pairs of keys for rows that have at least one property in common
I'm using polars with a data frame whose schema looks like this:
Schema({'CustomerID': String, 'StockCode': String, 'Total': Int64})
interpreted as "Customer CustomerID bought Total of product ...
-1
votes
1
answer
43
views
SQL - Map child values to Parent in table
Input table #1:
country
child id
parent id
USA
12345
98765432
USA
13579
98765432
Input table #2:
country
account_id
account_type
id
USA
acc_1
inhouse
98765432
USA
acc_2
inhouse
12345
USA
acc_3
inhouse
...
10
votes
3
answers
510
views
How to safely handle thread join when interrupt signal (SIGINT) may arrive during join()?
I’m facing a design issue in a multithreaded C++ program related to safely shutting down threads.
Here’s the problem:
My main program starts multiple threads.
During shutdown, I call join() on each ...
-1
votes
1
answer
56
views
mysql join return all records from left table
table comment report
CREATE TABLE $comment_report_table (
`comment_id` int(11) unsigned DEFAULT NULL,
`user_id` int(11) unsigned DEFAULT NULL,
`reason` varchar(100)...
1
vote
2
answers
58
views
How can I append my dataset based on timestamp?
I have two datasets, one I'll call the master and the other the supplemental. They both have observations at 10 minute intervals, but there are gaps in time in the master that I want to fill with the ...
0
votes
0
answers
36
views
Why isn't MySQL using appropriate indexes when available? When forced to use them, the performance difference is dramatic; is this normal?
I've got the following SELECT statement where all columns are properly indexed with the column they're joining on. I.e. all PKs & FKs have a corresponding, single-column index shown later ending ...
-1
votes
1
answer
59
views
SQL syntax Inner Join [duplicate]
I keep getting a syntax error using phpmysql:
UPDATE
allbooks
SET
allbooks.bookCoverImage = books.bookCoverImage,
allbooks.bookDescr = books.bookDescr,
allbooks.bookEbook = books....
3
votes
2
answers
114
views
Select items by multiple and variable many-to-many relationships
Items:
id
category_id
name
Categories:
id
name
1
x
2
y
3
z
4
a
Tags:
id
name
1
Tag1
2
Tag2
3
Tag3
Tags_items:
tag_id
item_id
Pool:
id
name
1
Good items
2
Nice items
Poolrule:
pool_id
cat_id
tag_id
...
1
vote
2
answers
88
views
Postgres inner join where and order by
Is there a way to efficiently order by a text field in a join query (i.e., fast on large datasets)? I understand that I probably need to filter the dataset somehow, to reduce the size of the dataset ...
0
votes
0
answers
69
views
Create dynamically linked servers in SQL Server
I need to create a LEFT JOIN with another server in SQL Server, and the information to what the server would be is inside table Servidor. So, I've tried to use the s.dns and s.banco as the information ...
0
votes
2
answers
57
views
Snowflake Join on a JSON field
I have 2 tables in Snowflake which contain a Json field, and I need to make a join based on this field. When this json has the same keys and values it means it equals. The problem is that I can't tell ...
-1
votes
2
answers
41
views
Many to many joins in sas issue in data
I have a data at customers payments level that i need to join with customer's account info level. The first two data set is my primary datasets and the third one is my required output. When i am ...
0
votes
2
answers
67
views
Join based on jsonb from left which may represent any column in right?
I'm trying to create collections of movies through a join. The gist of the project is that new movies are added all the time and are tagged with certain qualities, so the collection would be updated ...