I will write, fix and optimize sql queries for mysql, postgresql, sql server
About this Gig
Need numbers out of your database fast? Send me your schema (or a sample export) and the question, and I'll send back clean, commented SQL that runs.
What I do:
- SELECT queries, JOINs, CTEs, window functions (RANK, LAG, NTILE)
- Reporting: monthly revenue, top customers, cohort retention, RFM segments, funnels
- Views, stored procedures and functions
- Fixing broken or wrong queries
- Speeding up slow queries (indexes, EXPLAIN plan review, rewrites)
- Excel/CSV to SQL imports and data cleanup
Databases: MySQL, PostgreSQL, SQL Server (T-SQL), SQLite, BigQuery, Snowflake.
Every order includes:
- A .sql file with comments explaining each step
- A test run on a copy of your data or sample, plus the result CSV
- Notes on indexes when speed matters
See the gallery for a real sample: a 400-customer shop database with revenue growth, LTV ranking, RFM segments and cohort retention, each query running in under 10 ms.
No calls needed. Message me your schema and question before ordering and I'll confirm scope and price.
Database type:
Relational database
Platform:
MySQL
•
PostgreSQL
•
SQLite
•
SQL Server
Expertise:
SQL
•
DQL
•
Performance
•
Query optimization
FAQ
Do you need access to my database?
No. A schema (CREATE TABLE statements), a screenshot of your tables or a small sample export is enough. I test on a copy and you run the final SQL yourself.
Which SQL dialect do you write?
Whichever one you use. Tell me MySQL, PostgreSQL, SQL Server, SQLite, BigQuery or Snowflake.
Can you make a slow query faster?
Yes. Send the query and its EXPLAIN output (or the table sizes) and I'll rewrite it and suggest indexes.
Can you turn the result into Excel or a chart?
Yes. Results come as CSV/XLSX, and charts are available on Standard and Premium.
Is my data safe?
Use sample or masked data if you like. I only need the structure, and files are deleted after delivery on request.

