Skip to content

Results for “sql”

9 prompts

Prepare me for a data analyst interview at [company type]. Give me 5 SQL questions with sample tables, 5 statistics concept questions, 2 business case questions, and model answers. Quiz me one at a time if I say 'start'.

ChatGPT
Career & Jobs

Data analyst interview prep

Covers SQL, statistics and case questions for analysts.

0

Write a script in [language] that generates [number] realistic fake records for [entity, e.g. customers with orders] matching this schema: [schema]. Use a faker library, keep relationships consistent, and output as [SQL/JSON/CSV].

ChatGPT
Coding & Development

Generate realistic test data

Creates realistic fake data for development and tests.

0

Review this PostgreSQL schema. Check normalisation, data types, constraints, foreign keys, indexes for likely queries ([queries]), naming consistency, and future scaling issues. Suggest improvements with migration SQL. Schema: [paste schema]

Claude
Coding & Development

PostgreSQL schema review

Reviews a database schema for performance and integrity issues.

0

Act as a data analyst. Database: [PostgreSQL / BigQuery / Snowflake / MySQL] Tables: [users(id, created_at), events(user_id, event_name, created_at), orders(...)] Questions: [monthly cohort retention, weekly active users, sign-up to purchase funnel] Write the queries with CTEs and comments, explain each step, and desc…

ChatGPT
Coding & Development

SQL for retention and cohort analysis

Write analytics SQL for cohort retention, funnels and active users.

0

You are a database performance expert. Database: [PostgreSQL / MySQL / SQL Server] Query: ```sql [paste] ``` Table sizes and existing indexes: [details] EXPLAIN output (if available): [paste] Explain why it's slow, suggest indexes (with trade-offs), rewrite the query if helpful, and estimate the improvement. Mention h…

Claude
Coding & Development

Optimise a slow SQL query

Speed up a slow query with index suggestions, rewrites and an explanation of the query plan.

0

Act as a backend developer. Framework/tool: [Laravel, Django, Rails, Prisma, Alembic, raw SQL] Database: [PostgreSQL/MySQL] Change needed: [e.g. add column, rename table, split a field] Table size: [rows] Write the up and down migration, any data backfill, how to deploy it safely without downtime (e.g. expand-and-cont…

ChatGPT
Coding & Development

Write a database migration

Create safe, reversible migrations for schema changes, including data backfills.

0

You are a database architect. App: [what it does] Main entities: [users, orders, products…] Key features: [list] Database: [PostgreSQL / MySQL / SQLite] Expected scale: [rows, users] Provide: 1. Entity-relationship overview (text diagram) 2. CREATE TABLE statements with types, constraints, foreign keys 3. Indexes and…

Claude
Coding & Development

Database schema design

Design a normalised database schema with tables, relationships, indexes and example queries for your app.

0

Act as a senior backend developer. Framework: [e.g. Express, FastAPI, Laravel, Django REST, Spring Boot] Database/ORM: [e.g. PostgreSQL + Prisma] Endpoint: [METHOD /path] What it does: [description] Request body/params: [fields and rules] Auth: [public / logged-in user / admin] Write: 1. The route/controller code 2. I…

ChatGPT
Coding & Development

Build a REST API endpoint with validation

Generate a production-ready API endpoint with input validation, error handling, status codes and tests in your framework.

0

Act as a SQL expert. Database: [MySQL / PostgreSQL / SQLite / SQL Server] Tables: [table_name](column1 type, column2 type, ...) [table_name](...) What I want: [describe the result in plain English, e.g. "top 10 customers by total spend in 2025, with their order count"] Please: 1. Write the query with clear aliases and…

ChatGPT
Coding & Development

SQL query from plain English

Describe the data you need in normal words and get a correct, readable SQL query with an explanation and performance tips.

0