Re: [sqlite] count distinct on multiple fields

2010-06-25 Thread Igor Tandetnik
Peng Yu wrote: > I use || to count distinct on multiple fields. It works for this > particular example. But I'm not sure if it is robust. Would you please > let me know if there is any better way? > > select distinct value1, value2 from test; > select count(distinct value1||value2) from test; se

[sqlite] count distinct on multiple fields

2010-06-25 Thread Peng Yu
I use || to count distinct on multiple fields. It works for this particular example. But I'm not sure if it is robust. Would you please let me know if there is any better way? #!/usr/bin/env bash rm -f main.db sqlite3 main.db