Playground
SQL
SQLite 쿼리 실행
query.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
-- SQL Playground (SQLite) CREATE TABLE users ( id INTEGER PRIMARY KEY, name TEXT NOT NULL, age INTEGER, city TEXT ); INSERT INTO users (name, age, city) VALUES ('Alice', 30, 'Seoul'); INSERT INTO users (name, age, city) VALUES ('Bob', 25, 'Busan'); INSERT INTO users (name, age, city) VALUES ('Charlie', 35, 'Seoul'); INSERT INTO users (name, age, city) VALUES ('Diana', 28, 'Incheon'); -- Query all users SELECT * FROM users; -- Filter and sort SELECT name, age FROM users WHERE city = 'Seoul' ORDER BY age DESC; -- Aggregate SELECT city, COUNT(*) as count, AVG(age) as avg_age FROM users GROUP BY city
Preview
Console
SQL
query.sql
UTF-8
Ln 1, Col 1
Spaces: 2