Skip to content

Instantly share code, notes, and snippets.

View hobodave's full-sized avatar
🎯
Focusing

David Abdemoulaie hobodave

🎯
Focusing
View GitHub Profile
SELECT fabric.CodFabric,fabric.Fabricante,fabric.Pais,
COUNT(distinct fabrics.CodJogo) as TotFab,COUNT(distinct publishs.CodJogo) as TotPub
FROM fabric
LEFT JOIN fabrics on fabric.CodFabric = fabrics.CodFabric
LEFT JOIN publishs on fabric.CodFabric = publishs.CodFabric
GROUP BY fabric.CodFabric
EXPLAIN
1 SIMPLE fabric ALL NULL NULL NULL NULL 1078 Using temporary; Using filesort
1 SIMPLE fabrics index NULL PRIMARY 8 NULL 10801 Using index