| От | David Wilson |
|---|---|
| Тема | Re: is a 'pairwise' possible / feasible in SQL? |
| Дата | |
| Msg-id | e7f9235d0808041202m157652c5xae27c08700a52d47@mail.gmail.com обсуждение исходный текст |
| Ответ на | is a 'pairwise' possible / feasible in SQL? (Rajarshi Guha <rguha@indiana.edu>) |
| Ответы |
Re: is a 'pairwise' possible / feasible in SQL?
|
| Список | pgsql-general |
On Mon, Aug 4, 2008 at 2:08 PM, Rajarshi Guha <rguha@indiana.edu> wrote: > select count(aid) where cid = 123 and cid = 456; > > but I was wondering whether I could construct a single SQL statement to do > this. > > Any pointers would be appreciated, Typed into gmail, so may need some tweaking, but something to the effect of: select count(*) from table a inner join table b on a.aid=b.bid group by a.cid,b.cid; should do the trick, I'd think... -- - David T. Wilson david.t.wilson@gmail.com
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера