Re: [SQL] How to optimize this query?
Maciej Piekielniak wrote: Hello Markus, Oryginal query return 7881 rows , your query only 729 rows. But it's faster! ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if
Re: [SQL] pgsql aggregate: conditional max
Weimao Ke wrote: Hi, I need a special aggregation function. For instance, given the following table data: aid| cat | weight --+-+- a1 | Drama | 1 a1 | Romance | 6 a1 | Short | 1 a1 | Other | 7 a2 | Comedy | 1 a2 | Dram