create procedure p(
@ids xml
)
begin
select name
from
dbo.table
inner join @ids.nodes('/items/item') root(items)
on id = items.value('(text())[1]', 'int')
end
<items>
<item>1</item>
...
<item>1000</item>
</items>
select post_id, count(1) c from _likes group by post_id having count(1) > 10