Skip to content

naming columns broken with "group by" #1

@keithshep

Description

@keithshep

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions