SQL Explorer
Demo Environment
This environment resets nightly. Any data or connections you add are public.
SQL Explorer
New Query
Playground
Connections
Logs
Favorites
在这种
Title
default
tq
base
history_1390634-1970-01-01-MAX_1.db
RMS
179146-Activity_2024-07-12_07-47_101208779_1.db
job_summary_1.db
vehicles_1.db
job_skills_1.db
IMDbMovies-Clean_1.db
sqlite-sakila.db
northwind.db
transactions_1.db
organizations-100000_1.db
maestro-v3.0.0_1.db
job_postings_1.db
Connection
最大的城市
Description
SQL
WITH customer_city AS (SELECT c.customer_id, a.city_id FROM customer c JOIN address a ON c.address_id = a.address_id), city_customer_count AS (SELECT cc.city_id, ci.city, COUNT(cc.customer_id) AS customer_count FROM customer_city cc JOIN city ci ON cc.city_id = ci.city_id GROUP BY cc.city_id, ci.city) SELECT city, customer_count FROM city_customer_count ORDER BY customer_count DESC LIMIT 1;
Save & Run
Save Only
Download...
CSV
JSON
Show Schema
Hide Schema
Format
SQL Assistant
Assistant prompt
"Ask Assistant" to try and automatically fix the issue. The assistant is already aware of error messages & context.
Select All
(?)
Search tables
Ask Assistant
Loading...
Preview
Pivot
  Execution time: 98.42 ms
Showing
of 1 total rows.
city
customer_count
Sum
2.0
Avg
2.0
Min
2.0
Max
2.0
NUL
0.0
0
Aurora
2
Link to this
Download CSV
Avg. execution: 14.232ms. Query created by admin on 2024-07-08.
History