R'
Номер выпуска: 18.5
Номер сборки: 15.0.18330.0
Дата выпуска: 7 апреля 2020 г.
Size: a a a
R'
k
R'
NR
КЕ
YS
КЕ
DS
К
DI
DS
ВБ
DS
DS
ВБ
SELECT DISTINCT CheckPos.CheckId
FROM CheckPos
WHERE CheckPos.CheckPosId IN (SELECT Id FROM #Selected);
DS
SELECT DISTINCT CheckPos.CheckId
FROM CheckPos
WHERE CheckPos.CheckPosId IN (SELECT Id FROM #Selected);
A
DS
A
with positions as (
select t.position_id, count(*) over () as position_count
from (values
(1)
,(2)
) t (position_id)
)
select distinct
t.check_id
from (
select
t.check_id
,count(*) over (partition by check_id) as check_position_count
,p.position_count
from data t
inner join positions p on t.position_id = p.position_id
) t
where t.check_position_count = t.position_count
A
with positions as (
select t.position_id, count(*) over () as position_count
from (values
(1)
,(2)
) t (position_id)
)
select
t.check_id
,max(p.position_count)
,count(*) as check_position_count
from data t
inner join positions p on t.position_id = p.position_id
group by t.check_id
having max(p.position_count) = count(*)