Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- Table1.Category1,
- Table1.Category2,
- count(*) as Total,
- count(Tab2.Stat) AS Stat
- FROM Table1, Table2
- WHERE (Table1.PrimaryKey = Table2.ForeignKey(+))
- GROUP BY Table1.Category1, Table1.Category2
- SELECT
- Table1.Category1,
- Table1.Category2,
- COUNT(*) AS Total,
- COUNT(Table2.Stat) AS Stat
- FROM Table1
- LEFT OUTER JOIN Table2 ON (Table1.PrimaryKey = Table2.ForeignKey)
- GROUP BY Table1.Category1, Table1.Category2;
Add Comment
Please, Sign In to add comment