Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

naming columns broken with "group by" #1

Open
keithshep opened this Issue Apr 6, 2011 · 0 comments

Comments

Projects
None yet
1 participant
Owner

keithshep commented Apr 6, 2011

Note how these two versions of (nearly) the same command will give different results:

tabtocsv bowtie-out.txt | namecolumns - | \
    tssql '
        select
            col1,
            count(*),
            sum(if_then_else(col8 = "", 1, 0))
        from `-`
        group by col1 order by count(*) desc' > hits-per-probe.csv

tabtocsv bowtie-out.txt | namecolumns - | \
    tssql '
        select
            col1 as probeID,
            count(*) as matches,
            sum(if_then_else(col8 = "", 1, 0)) as perfect_matches
        from `-`
        group by probeID order by count(*) desc' > hits-per-probe.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment