Re: Multiple selects in one statement
Posted by:
Radu Enea
Date: February 14, 2021 10:09PM
I finnaly made it.
$query = " SELECT
-- OrderID,
DATE_FORMAT(OrderDate, '%d %M %Y (%a)') as dateCreated,
count(*) AS numbers,
sum(case when cart LIKE '%Click2call%' then 1 else 0 end) AS Click2call,
sum(case when cart LIKE '%freedom%' then 1 else 0 end) AS Freedom
FROM
new_orders
WHERE
(OrderDate BETWEEN '$substr' AND '$today')
GROUP BY
DAY(OrderDate)
ORDER BY
OrderDate DESC
";
Subject
Written By
Posted
February 14, 2021 07:12AM
February 14, 2021 12:14PM
February 14, 2021 12:48PM
Re: Multiple selects in one statement
February 14, 2021 10:09PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.