Questions tagged [full-outer-join]

A full outer join combines the effect of applying both left and right outer joins.

Conceptually, a full outer join combines the effect of applying both left and right outer joins. Where records in the FULL OUTER JOINed tables do not match, the result set will have NULL values for every column of the table that lacks a matching row. For those records that do match, a single row will be produced in the result set (containing fields populated from both tables).

243 questions
-1
votes
1 answer

SQL full outer join + group by + count column

I have two tables: currency_table_1 ID - currency_1 ------------------ 01 - EUR 02 - EUR 03 - EUR 04 - USD 05 - USD 06 - USD currency_table_2 ID - currency_2 ------------------ 01 - EUR 02 - EUR 04 - JPY 05 - …
Timo
  • 3
  • 1
-1
votes
4 answers

Microsoft SQL Server Conditional Joining based on 2 columns

I am looking to join 3 tables, all with the same data except one column is a different name (different date for each of the the 3 tables). The three tables look like the following. The goal is if a condition exists in table 1 AND/OR table 2…
Brad
  • 83
  • 11
-1
votes
1 answer

Full outer join like functionality but merging columns

TableA id | symbolA 1 m 2 n 4 o TableB id | symbolB 2 p 3 q 5 r I'd like the following result: id | symbolA | symbolB 2 n p 1 m NULL 4 o …
Liem Ta
  • 19
  • 2
-1
votes
1 answer

Relational Algebra- fullouterjoin

The “left outer join” operation is an extension of the relational join operation. The basic idea is that all tuples in the left relation always appear in the “left outer join” result, irrespective of whether they join with any tuple in the right…
-1
votes
2 answers

Is there any way to make FULL OUTER JOIN table match with the correct record?

I'm trying to join two table using FULL OUTER JOIN that two table have different row of data and the column between this two table are same. Table 2 FULL OUTER JOIN Table 1 Table 1 id     name         Payment Amount === ========…
Jack Fire
  • 1
  • 1
-1
votes
2 answers

Hive Full Outer Join Returning multiple rows for same Join Key

I am doing full outer join on 4 tables on the same column. I want to generate only 1 row for each different value in the Join column. Inputs are: employee1 +---------------------+-----------------+--+ | employee1.personid | employee1.name …
user1326784
  • 483
  • 2
  • 6
  • 23
-1
votes
1 answer

how to get all the data from database from 3 tables?

My problem is, i am getting the datas which is present in all the 3 tables.But i want to display the data which is not present in any one of the table(that is empty space or 0 is printed on that item if it's not present in anyone of the table)..i…
Teddy
  • 102
  • 10
-1
votes
1 answer

Full outer join in postgres

I have the following table in Postgresql: sch_code sch_level start_date end_date flag 1234 P 01-01-2018 31-01-2018 V 1234 S 01-01-2018 31-01-2018 V 5678 S 01-01-2018 31-01-2018 …
prajakta
  • 21
  • 1
  • 8
-1
votes
1 answer

Sqlite get the average of combined two tables columns

I have the following problem which i'm not sure how to approach a solution. I have the following db schema: I want to get the median of both columns of both tables, filtered by userid, year and month. Doing this with two separate queries, i would…
richard slond
  • 180
  • 11
-1
votes
1 answer

Combine results of multiple MySQL queries (w/ Group By) on 1 table

What's the best way to do this? I'll describe below, but here is a setup at rextester.com data to play with- http://rextester.com/PXQOV60475 I have a table called "cases" that contains info on repair jobs basically. There is a field for the Case…
mikato
  • 921
  • 2
  • 10
  • 22
-1
votes
2 answers

pgSQL: Full Outer Join on two columns is omitting rows

Some background, I am making a table in pgSQL9.5 that counts the amount of actions performed by a user and grouping these actions by month using date_trunc(). The counts for each individual action are divided into separate tables, following this…
-1
votes
1 answer

MySql Full Join

I'm using MySql So I have 5 tables and I'm trying to build a view which joins all these together and shows the missing information the current structure is. plat (1 = Many) PG (1 = Many) TS PG (1 = Many) PGHist TT (1 = Many) TS OR I am using MySql…
-1
votes
1 answer

Full Outer Join not flagging errors with incorrect output in Oracle

I am trying to implement a full outer join query that displays all customers and staff and their sum of all their purchases. It is running without throwing any errors, however, the aggregate sum function isn't working. Only the N/A is being printed,…
-1
votes
2 answers

Using FULL OUTER JOIN and/or UNION to combine tables with like fields

I'm trying to create a view of two tables that have many fields in common. The fields that exist in both tables should exist under one field in the new view. I've found some posts here and another I've lost track of that suggested using UNION and…
Makenbaccon
  • 361
  • 6
  • 18
-1
votes
2 answers

Full outer join linq using union

I have two lists var left={[ID=1,Name='A',Qty1=0,Qty2=5],[ID=2,Name=B,Qty1=0,Qty2=52]}; var right={[ID=1,Name='A',Qty1=57,Qty2=0],[ID=2,Name=B,Qty1=84,Qty2=0]}; var outer=left.union(right); I want to get the following…
decoder
  • 784
  • 18
  • 44
1 2 3
16
17