Database Querying

1. Introduction

The VNDB database is available for public querying at query.vndb.org.

2. Rules & notes

  • You need to be logged in on VNDB in order to write new queries.
  • The database runs on PostgreSQL.
  • Queries are run against an import of the near-complete database dump, updated daily at 8:30 UTC. This means that it may take up to 24 hours for changes to the main database to show up in query results.
  • Maximum query execution time is 60 seconds (but you may get a timeout before that).
  • The database can include additional indices, (materialized) views, stored procedures or other caches that are not available in the original dumps. These are listed in /extras.sql.txt. Feel free to suggest additions to that file in t12800.
  • The interface runs a slightly modified version of SQLPad, bug reports and feature requests may be posted in t12800, but you can also send pull requests directly to the SQLPad repository to give others a chance to provide feedback.
  • The database schema will likely change over time and this may break your saved queries.
  • The service is provided for humans only. Please DO NOT use bots or crawlers to interface with query.vndb.org, instead use the API or just get the database dumps directly.
  • Data obtained through the querying service is available under the Open Database License + Database Contents License, see our Data License for more information.

3. Usage

Make sure you are logged in on VNDB, then go to query.vndb.org. You can freely write and run queries.

To share your query with others, enter a query name and hit the save button.

You can manage your saved queries by hitting the "Queries" button at the left top. By changing the selection from "My queries" to "All" you can browse other people's saved queries:

Table and chart links do not require a VNDB account and can be shared with anyone.

4. Interesting queries

If you've written a query that may be useful or interesting for others, please share them in t12800. Here's a few:

4.1. Moderation tools

4.2. Stats

4.3. Custom querying