📄️ Syntax
SQL-inf extends any SQL dialect by introducing specialized commands designed for data analysis and predictive analytics. Understanding the syntax will enable you to get the most out of SQL-inf's capabilities. This document discusses the general structure, input handling, and output generation in SQL-inf.
📄️ PREDICT
The PREDICT command lets you run a prediction on a given column using the rest of the column names specified in the SELECT statement as inputs to the prediction.
📄️ EXPLAIN
The EXPLAIN command takes an SQL-inf command as input and outputs an "explanation" of the output of the inner
📄️ How it works: PREDICT & EXPLAIN
PREDICT is easily the most popular command at Infer, often used in combination with EXPLAIN to gain valuable insights on the data-of-interest.
📄️ SENTIMENT
The SENTIMENT commands lets you predict the sentiment of text given a text column as input.
📄️ How it works: SENTIMENT
SENTIMENT allows users to get the sentiment (Positive, Negative, Neutral) of any kind of text data using a Sentiment Analysis model powered by large language models.
📄️ TOPICS
The TOPICS commands lets you predict the topics of a piece of text given a text column as input.
📄️ How it works: TOPICS
Topic analysis is a technique used to identify and extract common themes or topics from a collection of documents or text data.
📄️ CLUSTER
The CLUSTER command clusters the rows in the input data table into groups of rows that are similar.
📄️ How it works: CLUSTER
Clustering is a type of analysis that allows us to place similar data objects (users, companies, etc) into groups or clusters.
📄️ FORECAST
The FORECAST commands lets you forecast a time series, given a time and a column to predict.
📄️ UPLIFT
The UPLIFT command is very similar to the AB_TEST command, where we are calculating how effective an A/B test has been.
📄️ AB_TEST
The AB_TEST command calculates a number of useful statistics for comparing groups,
📄️ Combining Commands
SQL-inf supports combining SQL-inf commands through chaining.
📄️ CORRELATION
The CORRELATION command calculates the correlations in your dataset between each input column, including both numeric can categorical columns.
📄️ DESCRIBE
The DESCRIBE command summarises your dataset using different useful metrics, so you can get a quick overview without deep analysis.
📄️ SHAP
The SHAP command takes an SQL-inf command as input and outputs a shap value for each row of the output and each column of the input data the inner SQL-inf command.
📄️ SIMILAR_TO
The SIMILAR_TO commands lets you compute a similarity score between a specific row and all other rows in the data set.
📄️ TRANSLATE
The TRANSLATE commands lets you translate text from a number of different languages to English.