У меня есть два запроса на выборку:
SELECT MONTH(date) AS month, count(DISTINCT ip)
FROM table_name WHERE field = 1 GROUP BY month
и
SELECT MONTH(date) AS month, count(DISTINCT ip)
FROM table_name WHERE field = 2 GROUP BY month
как мне написать один запрос для выбора
SELECT MONTH(date) AS month,
count(DISTINCT ip) [ for field = 1],
count(DISTINCT ip) [ for field = 2]