Data mining enables you to write a SQL query that can be highly specific and advanced. The downside is that there is a bit of a threshold for people who are not familiar with SQL.


To get started with SQL there is a basic article on SQL select queries here: http://www.w3schools.com/sql/sql_select.asp


Once/if you know the basics you can start using the more advanced features and you will notice that not all dialects of SQL are the same. For the documentation on the features you can use see the official documentation here https://my.vertica.com/docs/7.2.x/HTML/ We have limited the use to select statements only.


Using the drop down menu you can select a database to query:


The most used ones are the events table and the user_metrics table. The fact_ tables are used to drive the measure dashboards.


Something you might like to know is the number of users that have sent a specific event today, you can achieve this with the following query:

    

SELECT 
    eventName,
    count(distinct userID) as 'number of users'
FROM events
WHERE eventDate = CURRENT_DATE
AND eventLevel = 0
GROUP BY eventName

  

Here we select the eventName from the events table and group the results by eventName. This will create a row per unique eventName. We then also retrieve the count distinct userId. Since each event (row in the events table) contains a userId we count the distinct values counting every user only once. We then focus only on the events that have a field for eventDate equal to the built in function CURRENT_DATE this causes the query to return a different result when run today from when it is run tomorrow, you can also manually put in the date such as '2016-05-29'.  Since events can contain multiple levels (when an event has an array or object nested) we focus on the events at eventLevel 0.