Re: newbie: how to return one iteration *per unique date (DAY!)* in a timestamp column?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I should have given an example ..

select count(*) as record_count, date(column_name) as date_field, 'my_table' as table_name
union all
select count(*) as record_count, date(column_name) as date_field, 'my_table_2' as table_name

and end up with:
count | date       | table_name
-------------------------------
5     | 2009-01-01 | table 1
10    | 2009-01-01 | table 2

I will try this. I got lost on your post before Ben offered the start of this version. But now I'll try this one. Probably tomorrow. I just want to say now - thank you guys for your attention to help me through these initial fires!
(I ordered some SQL books.)

-G


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux