| От | Ian Barwick |
|---|---|
| Тема | Re: difficult query |
| Дата | |
| Msg-id | 200205041744.48054.barwick@gmx.net обсуждение |
| Ответ на | difficult query (Jakub Ouhrabka <jouh8664@ss1000.ms.mff.cuni.cz>) |
| Список | pgsql-sql |
On Saturday 04 May 2002 16:00, Jakub Ouhrabka wrote: > Hi, > > I'd like to ask how to write sql query returning following results without > using any other table than table1 (e.g. without outer join with table > containing all possible day numbers...) (...) > I'd like to write query returning this: > > query results: > day | number of records for a day > ---------------------- > 1 | 2 > 2 | 1 > 3 | 0 <--- !!! > 4 | 2 > > Is it possible to do this in sql? Basically, no. (You might be able to do it with the help of a user-defined function though). Why do you want to do this? Ian Barwick
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера