Howdy, I have a database of mailing list entries where I would like to do some statistics on activity on different days of the week. So say I want to do something along the hypothetical lines of SELECT COUNT(*) FROM table WHERE day_of_week(date) = 'Mon' how do I go about doing that? Martin -- GPG public key: http://home1.stofanet.dk/factotum/gpgkey.txt
Martin Christensen wrote: > > Howdy, > > I have a database of mailing list entries where I would like to do > some statistics on activity on different days of the week. So say I > want to do something along the hypothetical lines of > > SELECT COUNT(*) FROM table WHERE day_of_week(date) = 'Mon' > > how do I go about doing that? > > Martin > I believe select count(*) from table where where to_char(day, 'Day') = 'Monday ' should do it. Note the three space pad on the end of 'Monday ' to make it the same length as 'Wednesday'
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера