Skip to content

Queries

Comparision

Bigint
SELECT * FROM "db"."table"
where ColumnA = ColumnB
limit 10;
String

Here we convert ColumnB to String and compare it with ColumnA which is a string.

SELECT * FROM "db"."table"
where ColumnA like CAST(ColumnB as VARCHAR)
limit 10;

Distinct

To print unique vaules in a column

SELECT DISTINCT ColumnName FROM "db"."table";

To print total number of unique vaules in a column

SELECT count(DISTINCT ColumnName) FROM "db"."table";

Back to top