All Downloads are FREE. Search and download functionalities are using the official Maven repository.

g3201_3300.s3220_odd_and_even_transactions.script.sql Maven / Gradle / Ivy

There is a newer version: 1.37
Show newest version
# Write your MySQL query statement below
# #Medium #Database #2024_07_23_Time_248_ms_(85.85%)_Space_0B_(100.00%)
select transaction_date,
sum(case when amount%2<>0 then amount else 0 end) as odd_sum,
sum(case when amount%2=0 then amount else 0 end) as even_sum from transactions
group by transaction_date order by transaction_date asc;




© 2015 - 2024 Weber Informatics LLC | Privacy Policy