Код: Выделить всё
select
count(app_entity_29.field_445) as count1,
app_entity_29.field_445 as type
from app_entity_29
where from_unixtime(app_entity_29.date_added, '%Y') = [filter_by_date]
group by app_entity_29.field_445Код: Выделить всё
select
name as type
from app_fields_choices
where
app_fields_choices.id in (
select
app_entity_29.field_445
from app_entity_29
where from_unixtime(app_entity_29.date_added, '%Y') = [filter_by_date])