Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
43 views

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 ...
Lovethenakedgun's user avatar
2 votes
1 answer
113 views

I am trying to combine 3 queries, but it doesn't work well. Separately they work very well. It is about the following. I want to search for all games the user has participated in, user - '$POSTCharID' ...
Dimko 696's user avatar
1 vote
2 answers
112 views

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 ...
Oskan's user avatar
  • 21
0 votes
2 answers
95 views

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 ...
user16759458's user avatar
0 votes
2 answers
85 views

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 ...
g-ulrich's user avatar
1 vote
1 answer
54 views

I have 4 tables tblProducts, tblSellers, tblViewedtimes, tblContactedtimes with below columns. How can we retrieve summary as below: tblContactedtimes SellerId CustomerID ProductID ContactedTime 2 ...
user1066231's user avatar
-2 votes
1 answer
94 views

I have the need to create a function which takes an input list or numpy array and creates into a string. The issue is easy enough to compute when knowing the numbers and the particulars. Like in the ...
mhooper's user avatar
  • 123
2 votes
1 answer
124 views

A nice feature of SQL Server's query planner is that if you do not use any columns from a joined table, and the join does not affect the cardinality of the query, it can be eliminated altogether. You ...
Ed Avis's user avatar
  • 1,622
0 votes
1 answer
24 views

I have a small Django project that consists of 2 models (Event, mem_ev) plus auth User and Profile such that Users --< mem_ev >-- Events (ie a classic many to many relationship between Users &...
Doug Conran's user avatar
1 vote
2 answers
147 views

I am facing a problem in my Databricks Delta Live Table (DLT) notebook. I am trying to join together two dataframes, of which one df is derived from the other, but I keep getting the following error: &...
Mads's user avatar
  • 37
0 votes
1 answer
156 views

I have two tables with order information, and am looking to find whether or not each order in one table has crossing potential with the other. Example tables: t1:([]ric:`a`b`c;side:`buy`sell`buy;size:...
Cole's user avatar
  • 345
2 votes
5 answers
98 views

I have the following Postgres SQL tables: db<>fiddle create table t1(id,sval)as values (88, 'X129de') ,(4, 'YHK33e') ,(44, '1K4892') ,(53, 'YHK33e') ,(42, 'YHK33e') ,(...
kahhengchong's user avatar
0 votes
2 answers
71 views

SQL Query - Get the Most Recent Queue Assignment Before Agent Availability I have two tables: Assignment and Status. The Assignment table records when an AgentID was assigned to a queue (...
marceloasr's user avatar
0 votes
1 answer
83 views

I'm trying to fetch chat-related data using Eloquent in Laravel 11 but I'm struggling to structure an optimized query using Eloquent relationships or joins. I have two MySQL tables: users -> id, ...
Uzair Usman's user avatar
3 votes
2 answers
91 views

I need to update a subset of a table based on information in another table: main_dt = data.table(ID = 1:3, flag=c(TRUE,TRUE,FALSE), treatment_id = c(1,2,1), total_cost = 0) costs_dt = data.table(...
Sinnombre's user avatar
  • 468
0 votes
0 answers
33 views

I have a powershell command that pulls a list of devices with PRT in the name to a variable & am then trying to format the list in an easy to read output $PrinterList = @(Get-WmiObject ...
Dave's user avatar
  • 15
1 vote
1 answer
58 views

I need help with SQL code that takes different values from the same column with each iteration and puts them in the same row without multiplying rows. Example: In table DECLARATIONS there is data ...
Jovan Jaksic's user avatar
3 votes
1 answer
54 views

I was looking into the nested loop join of Postgres and its variations when I got a question. For the default nested loop join, Postgres scans the inner relation every time for each tuple in the outer ...
Kim Beob Woo's user avatar
1 vote
1 answer
190 views

I attempted to use a Common Table Expression (CTE) to update a table in PostgreSQL with the following query: WITH TMP AS ( INSERT INTO TABLE1 (...) SELECT (...) FROM TABLE2 RETURNING *) ...
bntshkya's user avatar
0 votes
1 answer
95 views

I know how to use basic SQL queries but need to know the best way to combine two queries. For example, I can output users within a certain distance and it automatically adds a distance field. Ideally ...
JulesUK's user avatar
  • 575
1 vote
1 answer
68 views

I asked an earlier question but kind of messed it up, so I'm reformulating it again here. I have 3 related tables: media media_tags (bridge table) tags Here's the code I have so far: SELECT m....
RobertW's user avatar
  • 414
0 votes
0 answers
36 views

I have a list (final_dff3) of 448 dataframes like below: head(final_dff3[[1]]) V2 V8 1 TNMD 0.0178 2 C1orf112 0.8201 3 STPG1 0.6201 4 CYP51A1 0.9435 6 WNT16 0.0282 7 HECW1 0....
recnid's user avatar
  • 13
0 votes
1 answer
66 views

Names Value Jack A2 Jack A3 Jack A4 Tom A5 Tom A6 How can I join all values in "Value" column in one cell that map to each name in Column Names? Also, have another column that counts the ...
Andy's user avatar
  • 11
0 votes
2 answers
170 views

I have some big dataset and I need to do multiple successive joins that are slow. I figured an alternative was to unpivot the whole dataframe I was merging successfully, join once and then get the ...
AD AD's user avatar
  • 45
0 votes
1 answer
150 views

I’m working on a PostgreSQL database with multiple tables, each containing millions of rows. Some of my queries with multiple joins are running slower than expected, and I want to identify the root ...
Tarik Anjum's user avatar