I gang

SQL statement needed for an ORACLE db - I use SQL developer

I need a SQL statement written for an ORACLE db - I use SQL developer.

Hi all,

I need SQL to compare the below 2 sub queries and then only show values that are different in the 'latest' (subquery2) subquery. Both subqueries use the same table to SELECT FROM:

**Subquery 1:**

select tra_rac_accno, tra_cr

from transactions

join admin_periods on trunc(sysdate-7) between ape_start_date and ape_end_date

and ape_admin_period_type = 'BAL'

and ape_aye_aun_code = 'CANTERBURYW'

and tra_date between ape_start_date and ape_end_Date

where tra_trt_code = 'HBS'

and tra_rac_accno not in ('2')

order by tra_rac_accno ASC

**Subquery 2:**

select tra_rac_accno, tra_cr

from transactions

join admin_periods on trunc(sysdate) between ape_start_date and ape_end_date

and ape_admin_period_type = 'BAL'

and ape_aye_aun_code = 'CANTERBURYW'

and tra_date between ape_start_date and ape_end_Date

where tra_trt_code = 'HBS'

and tra_rac_accno not in ('2')

order by tra_rac_accno ASC

Subquery 1 Output:

**tra_rac_accno tra_cr**

318 66.7

323 97.67

328 107.26

336 96.95

340 80.14

Subquery 2 Output:

**tra_rac_accno tra_cr**

318 69.5

323 97.67

328 107.26

336 96.95

340 50.20

I want to see the following output:

**tra_rac_accno tra_cr**

318 69.5

340 50.20

I appreciate all who take time to read this post and also respond with assistance. THANK YOU!

Evner: SQL

Se mere: for freelance web developer which language should i use asp net or php, oracle db driver wrapper sql log, macromedia dreamweaver list use aspvbscript sql server, oracle sql queries examples, how to open sql worksheet in sql developer, how to use pl/sql developer tool, how to write query in oracle sql developer, oracle sql developer query builder, oracle sql developer commands, how to run query in pl sql developer, oracle sql developer queries pdf, use template sql, freelance developer sql manila, use borland sql, check use member sql role, use dob sql find youngest oldest show age, insert xml use net sql, use dts sql 200 sql 2005, difference database administrator database developer sql server, developer sql company egypt jobs

Om arbejdsgiveren:
( 0 bedømmelser ) London, UK, United Kingdom

Projekt ID: #15637945

Tildelt til:

mabubakr969

A proposal has not yet been provided

£13 GBP på 1 dag
(0 bedømmelser)
0.0

2 freelancere byder i gennemsnit £16 på dette job

ravirawat0786

I have checked detail your requirements and ready to start right now. I am available with Skype, Gtalk and phone. waiting for reply. Relevant Skills and Experience i have a experience in sql and oracle also Stay tun Flere

£18 GBP på 1 dag
(0 bedømmelser)
0.0