Re: SQL group by help

2020-12-12 Thread Alban Hertroys
> On 11 Dec 2020, at 18:24, Chris Stephens wrote: > > I'm trying to create a visual representation of a 6x8 grid of samples on a > rack using the following SQL format: > > with rack_display as ( > select sr.ts rack_ts > , sr.rack_id > , r.rack_barcode > , 1 as row_

Re: SQL group by help

2020-12-11 Thread Rob Sargent
What > On Dec 11, 2020, at 10:24 AM, Chris Stephens wrote: > >  > I'm trying to create a visual representation of a 6x8 grid of samples on a > rack using the following SQL format: > > with rack_display as ( > select sr.ts rack_ts > , sr.rack_id > , r.rack_barcode >

SQL group by help

2020-12-11 Thread Chris Stephens
I'm trying to create a visual representation of a 6x8 grid of samples on a rack using the following SQL format: with rack_display as ( select sr.ts rack_ts , sr.rack_id , r.rack_barcode , 1 as row_pos , max(case when rack_well = 0 then 'A1: '||sample_barcode end