TGTGInsighttelegram intelligenceLIVE / telegram public index
← Data Analytics
Data Analytics avatar

TGINSIGHT POST

Post #2694

@sqlspecialist

Data Analytics

Views5,670Post view count
PostedApr 804/08/2026, 11:14 AM
Post content

Post content

17. What is a FULL OUTER JOIN? Returns all rows from both tables. If there's no match, unmatched sides are filled with NULL. Useful to see data that exists in either table but not in both. 18. How do you find duplicates across tables? Use INTERSECT or: SELECT t1.* FROM table1 t1 WHERE EXISTS ( SELECT 1 FROM table2 t2 WHERE t1.key = t2.key ); Or use UNION ALL + GROUP BY to count occurrences. 19. What are SQL constraints? Rules that enforce data integrity: • PRIMARY KEY, FOREIGN KEY, UNIQUE, NOT NULL, CHECK, DEFAULT. They keep data consistent and help the query optimizer. 20. Explain GROUPING SETS. GROUPING SETS lets you define multiple grouping levels in one GROUP BY: GROUP BY GROUPING SETS ( (), -- grand total (a), -- by a (b), -- by b (a, b) -- by a and b ); Useful for multi‑level summaries (like OLAP reports). SQL Programming: https://whatsapp.com/channel/0029VanC5rODzgT6TiTGoa1v Double Tap ❤️ For More