select tab.min_id, tab.displayname, Round(tab.velicina/1048576,2) real_size, Round(l.value/1048576,2) kvota from (select min(id) min_id, cl_id,displayname, sum(real_size) velicina from domains d where status=2 group by cl_id) tab, subscriptionproperties sp, limits l, subscriptions sb where...