Загрузка данных


select
    s.row_id,
    s.username,
    s.code,
    count(*) as cnt
from tools.selection s
where s.row_id in (683, 684)
  and s.username = :username
  and s.code = :query_table_code
group by
    s.row_id,
    s.username,
    s.code
order by s.row_id;