SIMILAR_TO commands lets you compute a similarity score between a specific row and all other rows in the data set.
The command will append a new column
similarity which has a score for each row between 0 and 1,
where 1 indicates that the two rows are identical.
You can read more about
SIMILAR_TO and how it works in the tutorial
column_namedefines the column name to use for specifying the row to compute similarities for.
valuedefines the value to use. The condition must specific a unique row in the data set.
ignorecan be used to specify columns (as a comma separated list) returned by the
SELECTstatement but which you want the
Appends one new column to the input data set:
The column holds a value between 0 and 1 for each row,
where 1 is the highest similarity score.
Computes the similarity between all rows and the row where the column
user_id has value
SELECT * FROM companies SIMILAR_TO(user_id=50)