def METHOD_NAME(con, snapshot):
    t = con.table("functional_alltypes")
    metric = t.int_col.nunique().name("nunique")
    expr = t[t.bigint_col > 0].group_by("string_col").aggregate([metric])
    snapshot.assert_match(to_sql(expr), "out.sql")
    assert_decompile_roundtrip(expr, snapshot)