Getting Started
Overview

๐Ÿš€ Overview

This overview goes over setting up AI Query with a new or existing database in four simple steps.

Step 1: Create an Account

Navigate to aiquery.co (opens in a new tab), and create a new AI Query account.

Step 2: Subscribe to a Plan

When getting started with AI Query, you have a choice of subscribing to a Monthly or Yearly subscription plan. Select the subscription plan, pay and you will now be ready to start your journey.

Step 3: Setup a Database

On the AI Query Dashboard, navigate to Databases.

If you already have a database setup, simply proceed to Step 4.

If you have to setup a new database, navigate to Add New Database:

  • Enter a Name for your database
  • Select the Type of the database

At this point, you have two options that allow you to define your database:

If you decide to go with the fastest and recommended approach:

  • Click Import From Script
  • Copy/paste your exported database schema from your database server
  • Click Import

If you decide to go with the manual approach:

  • Click Create First Table
  • Enter the Name for your table
  • Click + Add Column and enter the Name and Type for each field in the table (repeat for each field in the table)
  • Click โœ” to save
  • Click + Add Table to repeat the steps above for each table

Step 4: Try Out a Query

On the AI Query Dashboard, navigate to Query Playground and select the Database.

๐Ÿ’ก

For example purposes we will use the Demo database.

Select Create Query as the Query Type for the Query Prompt.

Below is a Query Prompt we want to use to generate a SQL Query:

Query Prompt
get all customers with more than 10 orders

Now click โ–ถ to generate the SQL Query .

SQL Query
SELECT c.customer_id, c.first_name, c.last_name, COUNT(o.order_id) AS order_count
FROM Customers c
JOIN Orders o ON c.customer_id = o.customer_id
GROUP BY c.customer_id, c.first_name, c.last_name
HAVING COUNT(o.order_id) > 10;

You'll see that you get a SQL Query generated based on the Query Prompt you specified! ๐Ÿคฉ