Introduction
Just like you would query any other existing data base you can query your raw data directly from Dexibit via our DXQL.
Queries
If you are new to the world of queries, here are some useful starting points for writing DXQL queries.
SELECT, FROM and LIMIT
A basic statement to get all columns from a dataset:
SELECT * FROM antarctic_tickets LIMIT 100
This will retrieve the first 100 rows in the table.
Table Names: Antarctic tickets in this example is the Table name. The table name can be seen on the relevant visualisation. Each data source (ticketing, membership, retail, Google reviews) will have its own table and thus will have its own table name.
OR simply click on the Metadata tab to see all the available tables
To select a particular column, you can write the column names like so:
SELECT booking_lead_time FROM antarctic_tickets LIMIT 100
ORDER BY
To sort by a particular column you can use ORDER BY:
SELECT * FROM antarctic_tickets ORDER BY booking_lead_time DESC LIMIT 100
Using DESC or ASC changes between descending (highest to lowest) or ascending (lowest to highest)
Aggregate functions
At this point, you may want to start finding out some aggregates. You can pair an aggregate function (SUM, AVG) in combination with a GROUP BY:
SELECT channel, AVG(booking_lead_time) FROM antarctic_tickets GROUP BY channel
The above gets the average booking lead time by channel.
To rename the aggregate column, you can use AS to give an alias, i.e.
SELECT channel, AVG(booking_lead_time) AS Average_lead_time FROM antarctic_tickets GROUP BY channel
Here’s a different query that will get the total sales of each different product
SELECT line_item_product_name, SUM(line_item_quantity) FROM antarctic_retail GROUP BY line_item_product_name
Metadata
Metadata is like a cheat sheet that explains everything about the data. Each data table has metadata to describe its characteristics. This includes details like what the data is about, how it's structured, and any special notes or instructions.
Our metadata also includes a "Derived" metric tag. Derived metrics are metrics that have been calculated by Dexibit. These are not part of your raw data, they are the extra insights that we are able to provide you based on your data. For more info on Derived metrics check out this article.