Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

need to count of distinct records and corresponding value exists or not in child table.

user590978Aug 7 2014 — edited Aug 7 2014

Hi,

I want to count the distinct keys in one table and wanna check whether values are exists in another table for distinct keys. and wants to show two columns from both the tables of counts.

I am doing via left join between two tables for the key and count distinct records.

{code}

  Select count(distinct al1.SEGA_DKEY),count(distinct al2.SEGA_DKEY)

   from DAILY_RESERVATION_table AL1

   left outer join SEGA_dim al2

   on al1.SEGA_DKEY = AL2.SEGA_DKEY

{code}

Please help me on this.

is this the right approach.

Any help would be appreciated.

Thanks,

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 4 2014
Added on Aug 7 2014
5 comments
1,351 views