xxxxxxxxxx
SELECT COUNT (DISTINCT column-name) FROM table-name
xxxxxxxxxx
select column_name, count(*) AS count FROM table_name GROUP BY column_name;
xxxxxxxxxx
# Assuming the row is a list/array
row = [1, 2, 3, 3, 2, 4, 5, 1, 1]
distinct_count = len(set(row))
print(distinct_count) # Output: 5