Database Schema Reference
user_id (uuid) - References auth.users
problem_id (integer) - LeetCode problem ID
is_solved (boolean) - Whether problem is completed
stars (integer) - Star rating (1-5)
created_at (timestamp)
updated_at (timestamp)
user_id (uuid) - References auth.users
problem_id (integer) - LeetCode problem ID
quiz_completed (boolean) - Whether quiz is completed
quiz_score (integer) - Quiz score (0-100)
completed_at (timestamp)
user_id (uuid) - References auth.users
skill_level (text) - 'Beginner', 'Intermediate', 'Advanced'
created_at (timestamp)
updated_at (timestamp)
id (integer) - Primary key
name (text) - Topic name
description (text) - Topic description
leetcode_id (integer) - LeetCode problem ID
title (text) - Problem title
difficulty (text) - 'Easy', 'Medium', 'Hard'
description (text) - Problem description
topic_id (integer) - References topics.id
SELECT * FROM user_problem_progress
WHERE user_id = ' user-uuid' AND problem_id = 1 ;
SELECT * FROM user_lesson_completion
WHERE user_id = ' user-uuid' AND problem_id = 1 ;
SELECT skill_level FROM user_profiles
WHERE user_id = ' user-uuid' ;
SELECT p.* FROM problems p
JOIN topics t ON p .topic_id = t .id
WHERE t .name = ' Arrays' ;