Uargh, okay, ich hab da schon zuviel rumprobiert.
Geht aber auch mit
SQL-Code:
select display_name,
(SELECT COUNT(*) from customer_viewed_coupons_view cvcv WHERE cvcv.city_id = c.id) as view_count,
(SELECT COUNT(*) from ordered_coupons_view ocv WHERE ocv.city_id = c.id) as buy_count,
(buy_count / view_count) as conversion
from cities c
nich.
Zitat:
Unknown column 'buy_count' in 'field list'