8,326 questions
-1
votes
1
answer
54
views
Improving performance on left join condition with CASE in Snowflake [closed]
I have a view which extracts data from two other views, joining on ID and date columns.
WITH CTE A AS
(
SELECT *
FROM TABLE A -- A UNION OF SEVERAL TABLES
),
CTE B AS
(SELECT *
FROM TABLE B
WHERE ...
2
votes
3
answers
146
views
How to left join two datasets in r based on several conditions? [closed]
I have two datasets (Each dataset around 1.8M rows), one contains per second data, and the other one sometimes have per second, every two second, or three second. I wanted to join these two datasets, ...
0
votes
1
answer
83
views
How to combine two data tables in PowerApps via Salesforce API (left join)
Table Opportunity Product does not have the product that corresponds with the Product Code in table Product.
How how do I combine these tables in PowerApps via the Salesforce API (left join)?
...
-1
votes
3
answers
159
views
Why doesn’t LEFT JOIN include all records from the original left table?
I'm encountering an issue with a LEFT JOIN in SQL that I can't quite figure out. I expect all records from my categories table to be returned, with NULLs for product columns where there's no matching ...
4
votes
5
answers
133
views
R: replace multiple occurrences of regex-matched strings in dataframe fields by looking them up in another dataframe
I have two dataframes:
df lookup:
oldId <- c(123, 456, 567, 789)
newId <- c(1, 2, 3, 4)
lookup <- data.frame(oldId, newId)
df data:
descr <- c("description with no match",
+ &...
-1
votes
2
answers
78
views
Trouble constructing left join query
The error is
Unknown database 'second_query'
The variable stats_group can contain one or more comma-separated field names. The query works when entered directly into MySQL Workbench with the ...
0
votes
0
answers
76
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
1
answer
74
views
how to fill the variable with missing value when the join fails to find a match in google earth engine
I am working with Google Earth Engine (GEE) and need to perform a left join operation between two image collections:
collection1 (lstDataset), which has 365 elements.
collection2 (NTTempdataset), ...
0
votes
0
answers
29
views
Flink table api leftouter join is fetching records with null for matching records on right side
Table result = s.leftouterjoin(t,$("key").isequal("t_key")).where(
$("t_key").isnull()). select(key,value, date);
Table s = tableenv.from("source");
Table t = ...
0
votes
0
answers
26
views
Stored Procedure that returns duplicate rows with different IDs [duplicate]
I am trying to stop duplicate data being returned. I have a DataId that has unique ids for 3 records that are all the same.
Please see the example below
DateId
DateMessage
Colour
DataType
MessageType
...
0
votes
3
answers
180
views
some FK values aren't in at least one of the other two lists, so they're returning `NULL`s
Rebuild_Stuff is a list of all needed parts. Official_All and Bought_List are "have" lists. Everything in Official_All needs to be doubled.
I want to compare the lists to see what is still ...
0
votes
1
answer
70
views
fuzzy_join of two dataframes based on ZIP codes
I am trying to fuzzyjoin two dataframes. Both contain the column with ZIP codes and some other columns. However, in the parental dataframe there are more ZIP codes than in the secondary one. I would ...
0
votes
0
answers
78
views
Kafka Streams Consumer Constantly Rebalance over 100k tps
We have a kafka streams service that performs a left join (KStreams) operation by their message key. The message size is 1 KB more or less.
The left topic has around two hundred thousand (200,000) ...
0
votes
1
answer
56
views
is it possible to do more than one CASE mysql left join [closed]
I am trying to query more than 3 tables in my database to end in one JSON result. So far I am able to add one CASE to add a resulting field and it works good but I would like to add another one. The ...
1
vote
1
answer
83
views
How to join two datasets based on the id, date and approximate time?
I need to merge datasets A and B based on the date, id and nearest time.
The time in the datasets are not matched. The time in B is always 0 to 10 minutes greater than the time in A.
I tried left_join ...
0
votes
1
answer
183
views
KQL join operator returning only left table columns
I have a KQL query which joins two tables (table1 and table2), but is returning only columns for the left table (table1). However, if I run these table queries individually, they both return their ...
1
vote
4
answers
206
views
How do I do a SQL Left Join that first tries to match on one column, but then matches on a different column if first match fails? [closed]
Output that I'd like:
How do I pull in all the people from Favorite Foods table (table 1), and match them up with their Email/Phone number from Table 2 using a name match, and if that doesn't work, ...
1
vote
1
answer
124
views
update on pandas join/merge performance in python
(I post this self-answered question to share my own tests.) There are a huge number of ways to join two DataFrames together in Python/Pandas. Previous performance analyses indicated that DataFrame....
0
votes
2
answers
83
views
many to many in left_join
Assume I have two dataframes that I want to join with each other. However they will end up in many-to many relations, which I do not want. If there are several matches of y to x, I want to consider ...
0
votes
2
answers
64
views
Create a MySQL statement joining multiple tables and doing a calculation after retrieving SUM, COUNT or NULL results [duplicate]
How do I create a SQL statement to paginate users calculated performance results?
Users
usersid | name etc...
1 | Satoshi
2 | Musk
Lessons with amounts
lessonsid | usersid | totalPay
1 | 1 | 200
2 | ...
0
votes
0
answers
39
views
MySQL fulltext MATCH AGAINST IN BOOLEAN MODE query using a LEFT OUTER JOIN table's column unexpectedly returns no results [duplicate]
In MySQL 5.6.51 using InnoDB, I have two tables:
users
user_aka_names
Table details:
user_aka_names has a foreign key, user_id to users
One user can have many user_aka_names
Not all users have a ...
0
votes
2
answers
134
views
sum case with left join
I would like to count the waves available (LEFT OUT JOIN). My problem is that I also have another LEFT OUTER JOIN on invitations.
The idea is to have all the stats from the same SQL request. Stats ...
0
votes
1
answer
37
views
LEFT JOIN on ROW_NUMBER OVER PARTITION
I have two tables :
1.Actions : Contains multiple actions performed on orderIDs on specific dates. For each orderID, there are multiple rows, each representing a different action performed on a ...
-2
votes
2
answers
248
views
Remove duplicate rows from LEFT JOIN with SELF JOIN
How to create a join that has all product_features with all feature_text rows
that joins a specific text for a feature if available
or else joins the general text for that feature?
The join must not ...
1
vote
1
answer
65
views
What Run time error in an SQL Query for join means
Run Time error '-2147217900(80040e14)'
with no comments from
Sub Step2_CreateReportSheetWithConn()
Dim ws_from$, ws_to$, group_name$
ws_from = "Data"
ws_to = "Result"
...