Quantcast
Channel: SQL.ru: Firebird, InterBase
Viewing all articles
Browse latest Browse all 1677

group by

$
0
0
Подскажите плиз, почему птица не хочет групировать так? вроди ничего криминального...

select
  iif(s.bundle_id is not null, 10, coalesce((select 3 from ta_bundle b where b.submit_slot_id = s.id and b.status_id = 3 rows 1), 1)) as status_id
from ta_submit_slot s
where s.submit_id = :submit_id
group by 1

Viewing all articles
Browse latest Browse all 1677

Trending Articles