Welcome to the SQL Playground, a platform designed to empower SQL enthusiasts to enhance their skills through hands-on problem-solving. Whether you're a beginner eager to learn or an experienced SQL pro looking for challenges, this playground has something for everyone!
- Top SQL Challenges: Access a curated collection of challenging SQL questions to test and improve your skills.
- Interactive Environment: Practice your queries in a real-world SQL environment without the fear of affecting production data.
- Immediate Feedback: Receive instant feedback on your queries to learn from your mistakes and refine your approach.
- Clone this repo.
- Setup .env.local file
# look into https://upstash.com/docs/redis/overall/getstarted
CACHE_URL=""
CACHE_ACCESS_TOKEN=""
# look into https://supabase.com/
NEXT_PUBLIC_SUPABASE_URL=""
NEXT_PUBLIC_SUPABASE_ANON_KEY= ""
- Make following tables
- Submissions
create table
public.submissions (
id text not null,
created_at timestamp with time zone not null default now(),
question text not null,
solution text not null,
status text not null,
difficulty text not null,
constraint submissions_pkey primary key (id, created_at, question)
) tablespace pg_default;
- Users
create table
public.users (
id text not null,
created_at timestamp with time zone not null default now(),
name text not null,
profile_image text null,
constraint users_pkey primary key (id)) tablespace pg_default;
- Make following views
- solved_submissions_view_4
create view
public.solved_submissions_view_4 as
select distinct
submissions.question,
submissions.difficulty,
submissions.id
from
submissions;
- Run locally
npm run dev
- Build the project
npm run build