vendredi 13 mars 2015

Selecting column name for frequency count in sqlite

I have a table in sqlite that contains roughly about 3 billion values (a lot of them will be repeats). It's basically a giant vector of values. I'm trying to calculate the frequency in which values appear in the table by performing this:-



SELECT abs(diffs), count(*) as total FROM mzdiff GROUP by abs(diffs);


abs(diffs) is the name of my column and mzdiff is my table name, but when I try performing the code above it comes up with an error message saying that the column diffs doesn't exist. I know that the naming of my column isn't really ideal for sql, but is there any way I can get around this?


Thanks


Aucun commentaire:

Enregistrer un commentaire