AI assistant
Things to try
Copy a prompt, paste it into your connected assistant, and change the database or table to suit you.
Explore the data
What databases does LearnSQL have? Pick a small one and explain what business it models.
Describe the Customers and Orders tables in northwind and show me how they relate.
Which tables in classicmodels would I need to find revenue by country? Show me the query.
Compare the same question in SQL Server and in MariaDB so I can see the dialect differences.
Learn SQL
Teach me GROUP BY using northwind. Give me three examples that build on each other, then an exercise.
Here is my query and what I want to know. Check it first, then tell me one thing I could improve.
Quiz me on joins using the world database. Do not show the answers until I try.
Explain what this query does, line by line, and what would change if I used a LEFT JOIN.
The server includes three ready-made prompts: explore_database, teach_concept and query_coach. In most apps they appear in a "+" menu or as slash commands.
Excel and Power Pivot
I want to analyze classicmodels in Excel. Which tables should I load and how do I relate them in the Data Model?
How do I add a measure in Power Pivot in Excel, and what is different from Power BI?
Write the Power Query steps to remove duplicates and trim spaces on a Customer column.
I have a PivotTable of sales by category. How do I show each category as a percent of the total using a measure?
Power BI and DAX
I loaded contoso into Power BI. Give me the DAX for year-over-year sales growth and explain each part.
Write a rolling 12-month sales measure and tell me what the Calendar table must look like.
Why does my percent of total show 100% on every row?
Check this DAX for mistakes: CALCULATE([Total Sales], [Margin %] > 0.5)
Show me how to build a Top 10 products visual with an "Others" bar.
More in Help with DAX and Power BI.
Accounting questions
In the qbo database, which invoices are unpaid, and how old are they? Group them into 30-day buckets.
Show spending by account in qbd for the last year in the data, with each account's share of the total.
Which Sage 100 tables hold accounts receivable? Explain how AR_Customer relates to the invoice tables.
Good habits
- Ask it to describe the table first so it uses the right names and columns.
- Ask why a query works. The explanation is where the learning is.
- Try writing the query yourself, then ask it to check yours.
- Say which engine you use (SQL Server or MariaDB) if you want a specific dialect.
- Check surprising numbers by running the shown SQL in the editor or in your own tool.