TGViewer
Data Analytics Data Analytics @sqlspecialist · 111K subscribers
Post #2694 6.59K
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
  • ❤ 13
  • 👏 1
More from @sqlspecialist
  1. Oct 9, 2026“Here, the data is sorted by the second column in descending order and the first five rows…
  2. Oct 9, 2026📊 Data Analyst Interview Series — Part 6 Guys, let's continue our Data Analyst Interview…
  3. Oct 9, 2026🇮🇳 𝗚𝗢𝗩𝗘𝗥𝗡𝗠𝗘𝗡𝗧 𝗢𝗙 𝗜𝗡𝗗𝗜𝗔 — 𝗔𝗜𝗖𝗧𝗘 𝗜𝗡𝗧𝗘𝗥𝗡𝗦𝗛𝗜𝗣𝗦 𝟮𝟬𝟮𝟲 🚀…
  4. Oct 8, 2026🎓 𝗠𝗶𝗰𝗿𝗼𝘀𝗼𝗳𝘁 𝗙𝗥𝗘𝗘 𝗖𝗼𝘂𝗿𝘀𝗲𝘀 𝘄𝗶𝘁𝗵 𝗖𝗲𝗿𝘁𝗶𝗳𝗶𝗰𝗮𝘁𝗲𝘀! 🚀🔥 Upgr…
  5. Oct 7, 2026📊 Kandinsky 6.0 Video: AI-Powered Content Creation for Analysts The new Kandinsky 6.0 Vid…
  6. Oct 7, 2026Alternatively, depending on the Excel version and requirement, I could use functions such…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →