- Executors
-
Learn
Learn Python Runnable examples, NumPy, pandas, and more Learn AI / Machine LearningNeural networks, ML and LLMs from scratch Learn C & C++ Pointers, memory, STL, and modern C++ Learn C#C# basics, OOP, LINQ, async, and .NET exercises Learn MatplotlibLine, bar, scatter and pie charts with live visualizers Learn RustOwnership, traits, error handling, and threads Learn GoSlices, interfaces, goroutines, and channels Python Algorithms Search, sorting, recursion, and visualizers O(n) C & C++ Algorithms Compare algorithms implemented in C and C++ Coding for Kids Learn to code by playing!
- QuizzesNew
- ChallengesNew
- For TeachersNew
- Updates
- Buy me a coffee
SQL Output Prediction
This SQL quiz shows short queries and asks what they return, the way many interviews do. It tests integer division, string concatenation, counting, ON vs WHERE in joins, UNION and the order SQL clauses really run in.
Sample question
Question 1 of 10What does this print in SQLite?
SELECT 7 / 2;
Show the answer
B. 3 Dividing two integers gives an integer in SQLite and PostgreSQL, so the fraction is cut off. MySQL's / always returns a decimal (3.5000); write 7 / 2.0 or CAST(7 AS REAL) / 2 to get 3.5 everywhere.
What this quiz covers
- Integer division and string concatenation
COUNT(*),COUNT(col)andCOUNT(DISTINCT col)WHEREvsHAVING, and filters inONvsWHEREUNIONvsUNION ALL, and text compared as text- The logical order of SQL clauses
Questions people ask
Do I need an account?
No. Anyone can play. Sign in to keep your XP, streak, badges and history.
Can I retake it?
Yes. Your best score is kept, and the questions and answers are shuffled each time.