Ist es möglich, die folgenden Abfragen zu kombinieren und das Ergebnis datewise erhalten:MySql-Abfrage mit einer anderen Abfrage zu teilen
Query1
select sum(Repeat_count) from
(select cust_ph_no,count(cust_ph_no) as Repeat_Count
from call_data
where date(call_start_date_time) = CURDATE()-1
and campaign_name = 'VT' and report_Id LIKE -2
and call_status_disposition not like 'supervised_transfer'
and campaign_type = 'IB'
GROUP BY 1
HAVING (Repeat_Count > 1))temp;
Query2
select
SUM(IF(call_status_disposition <> 'lt',1,0)) AS Offered
from call_data
where date(call_start_date_time) = curdate()-1 and
campaign_name = 'VT' and
report_Id LIKE -2 and
call_status_disposition not like 'supervised_transfer' and campaign_type = 'IB';
Query1 Ergebnis ---> 350
Frage2 Ergebnis ---> 1355
Was ich will ist .... eine Abfrage, die Query1/Query2 (350/1355 = 26%) teilen kann.
Und auch wenn ich dieses Datum weise bekommen kann (derzeit verwende ich CURDATE() - 1).
Spalte Datum ist call_start_date_time
Dank
Bitte Hilfe .... –