oracle - SQL Tools Include Rows that has null or value of 0 -


i have been working on practice problem sql class past 30 minutes. having hard time including rows have null values in or numerical value of 0. post question , query have written:

"write query display tour name, outing date, , number of registered clients each outing of tour on each date. include outings scheduled occur after october 27, 2013. include tours no outings , outings no registered clients. sort result number of clients in descending order, , outing date in ascending order."

select tour_name,out_date,count(distinct client_num) "num clients" tour right join outing using (tour_id) join register using (out_id) to_char(out_date,'yyyy-mm-dd') > '2013-10-27'  group tour_name,out_date order "num clients" desc,out_date; 

i cannot figure out how pull rows empty cells. pulls complete rows.

-expected results: --tour_name --out_date --num clients

weekend weekday 29-oct-13 26 downtown 28-oct-13 25 deluxe day away 28-oct-13 23 quick break 30-oct-13 19 downtown 27-oct-13 18 downtown 30-oct-13 18 deluxe day away 31-oct-13 12 washington heights 31-oct-13 10 weekend weekday 13-nov-13 0 downtown 14-nov-13 0 beltway 15-nov-13 0 weekend weekday 15-nov-13 0 quick break 16-nov-13 0 power shots 0 perfect endings 0 primary point 0

my actual results: tour_name out_date num clients weekend weekday 29-oct-13 26 downtown 28-oct-13 25 deluxe day away 28-oct-13 23 quick break 30-oct-13 19 downtown 27-oct-13 18 downtown 30-oct-13 18 deluxe day away 31-oct-13 12 washington heights 31-oct-13 10

it's not including rows has null value or 0 count value within row.

i appreciate help. thank you.


Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -