Re: [GENERAL] group by and aggregate functions on regular expressions

2007-03-08 Thread Omar Eljumaily
select count(*), address where address ~* 'magil' or address ~* 'whitewater' etc group by address would that work? Rhys Stewart wrote: Hi all, i have a table with an address column. I wanted to count the number of rows with a given regex match. so i ended up with the following very verbose

[GENERAL] group by and aggregate functions on regular expressions

2007-03-08 Thread Rhys Stewart
Hi all, i have a table with an address column. I wanted to count the number of rows with a given regex match. so i ended up with the following very verbose query: select address ~* 'magil' as Magil , address ~* 'whitewater' as whitewater, (address ~* 'inswood' or address