Hi.
I tried to make list how many machine (mch_code) is under warranty in
each month.
Valid_until is like YYYYMM. Description is type of machine.
select c.valid_until,
c.description,
(select count(a.mch_code) from ifsinfo.cust_warr_detail a
where a.valid_until >= c.valid_until and
a.description=c.description
group by a.mch_code)
from ifsinfo.cust_warr_detail c
group by c.valid_until,
c.description
This query gives error "Not group by expression".
I have tried to add whole subquery to main Group by section but it
didn't solve this..
System gives error: "Subquery expressions not allowed here".
Do someone knows what kind of SQL query is should use?
Thanks!
Ps.
Also one working solution is that machine is listed every "month" if
machine is under warranty on that month.
So I can group/count these in Excel with pivot.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en
-~----------~----~----~----~------~----~------~--~---