Losstype as type,"LossType" as who,count(*) as counted
FROM
`losscodes`
group by losstype
union
select "XXXX","DenialType",0
union
SELECT
DenialType as type,
"DenialType" as who,
count(*) as countit
FROM
denialcodes
group by denialtype
order by who,type
Produces:
<code>
Computers DenialType 2
Electronics DenialType 14
Furniture DenialType 84
General DenialType 12
XXXX DenialType 0
LossType 1
Appliance LossType 1
Electronics LossType 11
Furniture LossType 20
Lawn and Garden LossType 1
Pool and Spa LossType 1
No comments:
Post a Comment