Menu

I built a free SQL practice site where an AI writes queries with subtle bugs and you have to find them

#sql#redditsql#wrong#exercises#query
Reading 0:00
15s threshold

Hello. I'm the maker, so take this as a self-promo post, and tell me if it doesn't fit here.

Most SQL practice I found is "write a query from scratch". On the job, a lot of the work is reading someone else's query and noticing it's wrong. Now that "someone" is often an AI. So I built Practisheet: SQL and Excel exercises on one fictional company's data (orders, customers, products, shipments, refunds, targets), where about 1 in 4 exercises gives you a query an AI assistant wrote that looks fine but isn't. A few examples:

a LEFT JOIN whose WHERE clause quietly turns it into an inner join

a share-of-total with the wrong denominator

a RANK with no tie-break, so the "top 3" has 4 rows

a revenue total that includes refunded orders

It runs in your browser (DuckDB), checks your result set, and when you're wrong it tells you what's off about your attempt without showing the answer.

There are 101 SQL exercises in 14 sections: basics, NULLs, CASE and conditional totals, joins, anti and self joins, set…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.