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

I have rows either in table t1 or in table t2. Both table have the common field id and name, and id is either null for t1 or t2(it cannot be in both table at the same time). Now I want to select all ...
WesternGun's user avatar
  • 13.1k
0 votes
1 answer
82 views

I'm attempting to do a full outer join in Postgres to see how data changes between the past 24 hours and the 24 hours before that ("today" and "yesterday" euphemistically). Some ...
callmetwan's user avatar
  • 1,360
1 vote
1 answer
64 views

I am trying to compare 2 tables (cloned table x original) using Full Outer Join on Snowflake but not getting the results I am expecting: select 'invoice' as TABLE_NAME, to_date(prd.date) as ...
Estrobelai's user avatar
-1 votes
1 answer
41 views

So i have three data frame having this information > dim(result) [1] 652265 10 > dim(rat) [1] 107190 2 > dim(mouse) [1] 219016 2 > names(result) [1] "ensembl_gene_id&...
PesKchan's user avatar
  • 1,016
0 votes
2 answers
510 views

In queries where I compare data between 2 tables, I often use combination of COALESCE and FULL OUTER JOIN to display records available only in 1 of the tables. Can this be done with less syntactical ...
user avatar
0 votes
1 answer
369 views

I am trying to create an sql query (postgresql) which does a full outer join between two tables. For demonstration purposes I will use two tables: movies and genre. Some movies do not have a genre ...
Emieligeter's user avatar
2 votes
2 answers
473 views

I needed to run the following on MySQL, but it doesn't allow FULL OUTER JOINs: SELECT COALESCE(t0.date, t1.date, t2.date, t3.date) AS date, COALESCE(t0.hits1, 0) AS hits0, COALESCE(t1....
Jayy's user avatar
  • 14.9k
0 votes
1 answer
135 views

What is the difference between natural full outer join and full outer join with a common columns using clause? They are the same.
Momen's user avatar
  • 11
0 votes
4 answers
123 views

Table A is a list of IDs. ID --- 1 5 9 ... Table B has IDs and another Y/N value. ID Value ---------- 1 0 2 1 3 0 ... I'd the count of Value for IDs that are: i) both in tables A &...
Winston Li's user avatar
0 votes
1 answer
129 views

I have two SQLite tables: CREATE TABLE T_A (year_A INT, amount_A DOUBLE); year_A | amount_A ---------------------- 2020 | 100.0 2020 | 200.0 2021 | 300.0 2021 | ...
zigma12's user avatar
  • 321
0 votes
2 answers
57 views

I would like to understand the easy/better way to join 2 tables with same characteristics and different measures as an example described below: tab1 Col1 Col2 Measure1 1 1 10 1 2 5 tab2 Col1 Col2 ...
Carlos's user avatar
  • 19
-1 votes
2 answers
653 views

In SQL I'm trying to combine multiple tables and grab the SUM of expenses per person, and sort those by highest total expense first. I have 3 tables: test1 (from grocery store #1) test2 (from ...
Greg-learner's user avatar
1 vote
2 answers
183 views

I have tables T1 and T2. Both have columns ID, X and Y. In addition, T1 has another column Z and T2 has another column A. ID is primary key. X is calculated from ID (so if ID matches, also X matches). ...
JoKing's user avatar
  • 470
0 votes
1 answer
84 views

How do I get full outer join in TimesTen DB? I tried this: select t1.column1, t2.column2 from table1 t1 full outer join table2 t2 on t1.column1 = t2.column2; This works in Oracle but when I run it ...
Jakub Znamenáček's user avatar
0 votes
1 answer
646 views

This is a problem that took me a long time to solve, and I wanted to share my solution. Here's the problem. We have 2 pandas DataFrames that need to be outer joined on a very complex condition. Here ...
v4gil's user avatar
  • 951
0 votes
1 answer
175 views

I have the following tables table name column names ----------- ------------------------ delivery_ service svc_name | svc_cost product prod_id ...
Raf's user avatar
  • 842
0 votes
0 answers
232 views

I have the following 2 queries that are almost identical except the second query contains a table join, where clause and has less FAXDEPTs(the commented out portion is included in Query 2 just shared ...
Scott's user avatar
  • 39
-1 votes
1 answer
114 views

I have two tables which have a common key between them, and quite a lot of other important infos ; for the sake of simplicity i will be using Combination A and Combination B. When a combination is met,...
Joe_sushi39's user avatar
1 vote
2 answers
389 views

suppose I have two tables A and B, both with only 1 column name. Some rows appear in both tables while some are exclusive to one table. I want to union these two tables together into a table C that ...
Urquhart's user avatar
  • 137
1 vote
2 answers
322 views

I have two tables, for example, Student and Grade. Those two tables have a relationship with many-to-many, so the table is StudentGrade. By using the .SelectMany query, I can retrieve all records ...
Steven Sann's user avatar
0 votes
1 answer
350 views

mysql> select * from r; +------+------+------+ | A | B | C | | 1 | 2 | 3 | | 1 | 2 | 4 | | 2 | 1 | 3 | | 3 | 1 | 3 | +------+------+------+ mysql> ...
Reason Behind Tech's user avatar
-2 votes
1 answer
54 views

I have two tables and joining them using full outer join. Tab1: Crossswalk Ind name 123 Y abc Tab2: Crosswalk Ind name 123 Null abc 123 Null bcd select coalesce(a.crosswalk,b.crosswalk), a.Ind, ...
Mohan Babu's user avatar
-2 votes
2 answers
186 views

I’m trying to query a DB sql oracle which combines 2 tables data but shows the locations which have not had any orders. I have created a location_t with the relevant grids by Mile from the main ...
kiddtech91's user avatar
0 votes
2 answers
66 views

I have two almost identical data sets that I am trying to union but I only want to union them if there isn't a date in File 1 for it already. Data Set 1 File Date Type 1 1/1/2020 a 1 1/2/2020 b 1 1/3/...
analytica's user avatar
  • 105
0 votes
2 answers
486 views

I am trying to create an output with a similar behaviour to FULL OUTER JOIN, with UNION in mysql The queires I am trying to combine are the same with different time frame parameteres EXAMPLE: Select * ...
veritaS's user avatar
  • 529

1
2 3 4 5 6