T
Tracy
Hi,
I m a sql novice.
want to write a query:
1st column: dates, from 1st day of the month to last day of the month, need
to show everyday
2nd column: total charges for the day
3rd column: total payment for the day
I use subqueries to write this, and 1st column would base on either
charges.date, or payment.date
here're problems
if the 1st column base on charges.date(payment.date), when there's no
charges(payment) on a day, but there's payment (charge), the whole row would
not show.
I know I should not depend on charges.date or payment.date, and i have no
control of daily activity. what else I could do?
it's there any other solutions? Thanks alot!!!!
I m a sql novice.
want to write a query:
1st column: dates, from 1st day of the month to last day of the month, need
to show everyday
2nd column: total charges for the day
3rd column: total payment for the day
I use subqueries to write this, and 1st column would base on either
charges.date, or payment.date
here're problems

if the 1st column base on charges.date(payment.date), when there's no
charges(payment) on a day, but there's payment (charge), the whole row would
not show.
I know I should not depend on charges.date or payment.date, and i have no
control of daily activity. what else I could do?
it's there any other solutions? Thanks alot!!!!