Home > database >  How to realize the oracle (SQL) in the sun
How to realize the oracle (SQL) in the sun

Time:10-16


,, how can increase lunisolar year through SQL language (oracle) statistics?

CodePudding user response:

The expected results posted, too

CodePudding user response:



Help to look at, thank you

CodePudding user response:

 
SELECT a warehouse, type,
CASE WHEN the inventory date & gt; THEN inventory quantity ELSE 0='2020-10-14' END AS day number,
CASE the WHEN DATEDIFF (MONTH, '2020-10-14', the inventory date) & gt;=0 THEN inventory quantity ELSE 0 END AS month quantity,
CASE the WHEN DATEDIFF (YEAR, '2020-10-14', the inventory date) & gt;=0 THEN inventory quantity ELSE 0 END AS number of years
FROM the TABLE


  • Related