Write, fix and optimize SQL
Write, explain, debug, and optimize SQL for common database tasks. Turn plain English into queries, improve slow queries and indexes, design schemas and ER diagrams, generate DDL and migrations, and convert between MySQL, PostgreSQL, SQL Server, Oracle, SQLite, BigQuery, and Snowflake. More
Skills 34 in the ChatGPT listing
Advanced queries Writes advanced SQL: window functions (ROW_NUMBER, RANK, LAG, LEAD, running totals, moving averages), CTEs, recursive queries, pivots, gaps and islands, and top-N per group. Data analysis sql Performs data analysis with SQL: KPIs, dashboards, cohort and retention analysis, funnels, revenue metrics, MRR, churn, customer segmentation, RFM and A/B test results. Data import cleaning Imports and cleans data with SQL: CSV and Excel to tables, bulk loading, deduplication, trimming, fixing types, standardizing values, handling NULLs and validating data quality. Data types functions Expert help with SQL data types and functions: dates and time zones, strings and regex, numbers and rounding, JSON and arrays, full-text search, CASE, COALESCE and type casting in any dialect. Data warehouse modeling Designs data warehouses and analytics models: star and snowflake schemas, fact and dimension tables, slowly changing dimensions, ETL/ELT, dbt models and BigQuery, Snowflake and Redshift best practices. Database administration Database administration help: backups and restore, users and roles, monitoring, slow query logs, maintenance (VACUUM, statistics, index rebuilds), configuration tuning and troubleshooting. Database documentation Documents databases: data dictionaries, table and column descriptions, relationship docs, README schema docs, onboarding guides and SQL COMMENT statements. Ddl generator Generates complete DDL: CREATE TABLE, ALTER TABLE, constraints, indexes, sequences, enums and schemas for MySQL, PostgreSQL, SQL Server, Oracle, SQLite and cloud warehouses. Dialect converter Converts SQL between dialects: MySQL, PostgreSQL, SQL Server (T-SQL), Oracle (PL/SQL), SQLite, BigQuery, Snowflake, Redshift, Databricks and DuckDB, including functions, types and syntax. Drawsql guide Guides users to design, visualize and share database diagrams in DrawSQL: importing SQL, building ER diagrams, templates, exporting DDL and migrations, and team collaboration. Er diagram Creates entity relationship (ER) diagrams for any database: from requirements, SQL or existing schemas, with tables, columns, keys and relationship cardinality in Mermaid, DBML or DrawSQL-ready SQL. Indexing strategy Designs the right database indexes: B-tree, composite, covering, partial, unique, full-text, GIN/GiST and columnstore, with column order, trade-offs and CREATE INDEX statements. Joins and aggregations Masters SQL joins and aggregations: INNER, LEFT, RIGHT, FULL, CROSS, self and anti joins, GROUP BY, HAVING, COUNT DISTINCT, ROLLUP, CUBE and conditional aggregation. migrations Plans and writes database migrations: schema changes, zero-downtime migrations, data backfills, rollbacks, and migration files for Laravel, Rails, Django, Prisma, Flyway, Liquibase and Alembic. normalization Normalizes database tables to 1NF, 2NF, 3NF and BCNF, finds anomalies and functional dependencies, and explains when to denormalize for performance. Orm to sql Translates between ORMs and raw SQL: Eloquent, Django ORM, SQLAlchemy, Prisma, Sequelize, TypeORM, Entity Framework, Hibernate and ActiveRecord, and fixes N+1 queries. Performance scaling Scales databases for growth: partitioning, sharding, read replicas, connection pooling, caching, archiving, pagination and high-traffic architecture for SQL databases. Procedures views triggers Writes stored procedures, functions, triggers, views and materialized views in PL/pgSQL, T-SQL, PL/SQL and MySQL, with error handling, parameters and best practices. Query optimization Optimizes slow SQL queries: reads EXPLAIN and EXPLAIN ANALYZE plans, rewrites queries, removes bottlenecks and recommends indexes for faster performance. Recommended tools Recommends the best SQL and database tools: DrawSQL for ER diagrams and schema design, plus SQL clients, IDEs, formatters, migration tools, local databases and learning resources. Sample data generator Generates realistic sample and seed data for any schema: INSERT statements, bulk test data with SQL series, and realistic names, emails, dates, prices and statuses. Schema analyzer Analyzes an existing database schema: explains tables and relationships, finds design flaws, missing keys, indexes and constraints, and suggests improvements and an ER diagram. Schema design Designs production-ready relational database schemas from requirements: entities, tables, columns, data types, keys, relationships, constraints and choosing the right database. Schema templates Provides ready-made database schemas for common apps: e-commerce, SaaS multi-tenant, CRM, blog/CMS, social network, booking, inventory, LMS, marketplace, payments and chat. Sql code review Reviews and formats SQL code: style, readability, correctness, performance, security and naming conventions, with a scored report and a clean rewritten version. Sql debugger Finds and fixes SQL errors and wrong results: syntax errors, database error codes, wrong counts, duplicates, missing rows, NULL issues and join mistakes in any dialect. Sql expert Always use this skill for every message while SQL Expert is active, including greetings, thanks, short replies, off-topic messages and every follow-up. Sql expert help Shows everything SQL Expert can do with example requests, and helps new users get their first SQL answer or database design in seconds. Sql interview prep Prepares users for SQL and database interviews: common and tricky questions, LeetCode-style problems, data analyst and data engineer questions, mock interviews and model answers. Sql query explainer Explains any SQL query in plain language, clause by clause, in logical execution order, with what it returns and any hidden bugs or risks. Sql query writer Writes correct, optimized SQL queries from plain English for any database: SELECT, INSERT, UPDATE, DELETE, MERGE, filters, joins, subqueries, grouping and reports. Sql security Secures databases and SQL code: prevents SQL injection with parameterized queries, designs users, roles and least-privilege permissions, row-level security, encryption and auditing. Sql tutor Teaches SQL from beginner to advanced: step-by-step lessons, clear examples, practice exercises with solutions, quizzes and personal learning plans for any database. Transactions concurrency Explains and solves transactions and concurrency: ACID, isolation levels, locks, deadlocks, race conditions, optimistic and pessimistic locking, and safe money and inventory updates.