Hi,
I tried to find a solution in the forums, but couldn't apply it to my problem. Maybe someone can point me in the right direction? I believe I have to do something with subqueries, but I'm missing general knowledge.
I have a query which returns the following fields:
installation (double, =prim.key)
contract (double)
list1 (boolean)
list2 (boolean)
list3 (boolean)
list4 (boolean)
example:
I need to count for each group the unique contracts, the number of installations with each unique contract, and the number of times a contract is listed on each of the four lists. In this example the result should be:
Do I actually have to nest a query for each count (seems complex)?
Any help is (as always) appreciated.
easyit
I tried to find a solution in the forums, but couldn't apply it to my problem. Maybe someone can point me in the right direction? I believe I have to do something with subqueries, but I'm missing general knowledge.
I have a query which returns the following fields:
installation (double, =prim.key)
contract (double)
list1 (boolean)
list2 (boolean)
list3 (boolean)
list4 (boolean)
example:
group installation contract list1 list2 list3 list4
NET 6000082793 3000234655 Ja Ja Nee Nee
LEV 6000082805 3000234655 Ja Nee Nee Nee
LEV 6000090818 3000262337 Nee Nee Nee Nee
NET 6000094998 3000238506 Nee Ja Nee Nee
LEV 6000095011 3000238506 Nee Ja Nee Nee
LEV 6000095024 3000238506 Nee Ja Nee Nee
NET 6000096615 3000238097 Nee Nee Ja Nee
I need to count for each group the unique contracts, the number of installations with each unique contract, and the number of times a contract is listed on each of the four lists. In this example the result should be:
Group contracts installations list1 list2 list3 list4
LEV 3 4 1 2 0 0
NET 3 3 1 1 1 0
Do I actually have to nest a query for each count (seems complex)?
Any help is (as always) appreciated.
easyit