Sample SQL File — Download a Test Database Script (Tables + 500 Inserts)
SQL script (schema + data) · .sql · MIME type application/sql
Download a sample SQL file — a portable script that creates a customers table and an orders table with a foreign key, inserts 12 customers and 500 orders, and ends with an example GROUP BY query. It uses only ANSI-compatible syntax, so it runs unchanged in PostgreSQL, MySQL, MariaDB and SQLite.
Use it to seed a development database, to test a SQL import feature, or as a fixture for tools that parse SQL (linters, migration runners, syntax highlighters). The same data is available pre-loaded in our SQLite sample.
Download sample SQL files
| File | Details | Size | Download |
|---|---|---|---|
sample-database.sql | — | 62 KB |
Need one of every data format? Download the data sample pack (202 KB, one small file of every data format (17 files)).
Use these files from the command line or CI
Every URL is stable and CORS-open. Pin the SHA-256 in your test and you will know the moment a fixture changes.
# Download one file curl -O https://pnb-website-bucket.s3.us-east-2.amazonaws.com/samples/data/sql/sample-database.sql # Verify it (SHA-256 is listed for every file above) shasum -a 256 sample-database.sql # Machine-readable index of every sample file curl https://pnb-website-bucket.s3.us-east-2.amazonaws.com/samples/index.json | jq '.files[] | select(.format=="sql")'
SQL format at a glance
| Full name | SQL script (schema + data) |
|---|---|
| Extensions | .sql |
| MIME type | application/sql |
| Dialect | Portable ANSI SQL (no vendor extensions) |
| Contents | 2 CREATE TABLE, 512 INSERT, 1 SELECT with JOIN |
| Encoding | UTF-8 |
What people test with sample SQL files
- Database seeding for demos and tests
- SQL import features in admin tools
- SQL parsers, formatters and linters
Frequently asked questions
How do I run this SQL file?
PostgreSQL: psql -d mydb -f sample-database.sql. MySQL: mysql mydb < sample-database.sql. SQLite: sqlite3 test.db < sample-database.sql. The script creates its own tables, so run it against an empty database or schema.
Are these SQL files safe to download?
Yes. Every file is generated by our own open script from scratch — nothing is scraped or user-uploaded — and contains no scripts, macros or executables. The SHA-256 of each file is published on this page so you can verify what you received.
Can I use the sample SQL files commercially?
Yes. They are free for any purpose, including commercial products, test suites, demos and redistribution, with no attribution required. There is nothing to license and no one to ask.
Can I hotlink these files or use them in CI?
Yes. Every link is a stable direct URL over HTTPS with Access-Control-Allow-Origin: * and long cache headers, so curl, wget, fetch() and test runners can pull them directly. A JSON index of every file is linked from each page (see the command-line section).
Related sample files
Testing a file pipeline? We build them.
Uploads, conversions, previews, document processing and media workflows are the kind of production systems Pine & Birch designs and runs for clients — which is why we needed these files in the first place.
See how we can help