Hello,
I'm sure there is someone here way smarter than me. I need help with a big to me query.
I would like to perform a query that gets the information I need and then join a count of some more information to the end of the output. (I know clear as mud)
Here's what I have so far,
This is the output,
118 TYPE A 100
118 TYPE B 20
118 TYPE C 200
I would like to add (a join I think) another column at the end of the report to include a count of the month that matches each account type where the rule is less than 1.
I know this would be very easy for someone but it seems to be escaping me.
Thanks in advance
I'm sure there is someone here way smarter than me. I need help with a big to me query.
I would like to perform a query that gets the information I need and then join a count of some more information to the end of the output. (I know clear as mud)
Here's what I have so far,
Code:
select a.rule, b.account, count(*) from Table1 a, Table2 b, Table3 c where c.rule = a.rule and a.month = DEC and a.rule > 0 and b.account_type != '*' group by b.account_type, a.rule;
118 TYPE A 100
118 TYPE B 20
118 TYPE C 200
I would like to add (a join I think) another column at the end of the report to include a count of the month that matches each account type where the rule is less than 1.
I know this would be very easy for someone but it seems to be escaping me.
Thanks in advance
Comment