Skip to content
Advertisement

Tag: pivot

Remove zero amount in a query

I have a table finalData with the following columns and data I am creating mysql query to display the income and expenses of Singapore per Area, but I have to exclude areas that has zero amount. Here’s the code I tried: Output should be like this Any help would be appreciated. Thanks Answer This logic would be simpler phrased with

Multiple columns from one column

I track the aging of customer invoices. The below code example returns the balance of customer invoices by customer that are between 0 and 30 days old. However, I want to run one query that pulls separate columns into Excel for each customer’s balance aged between 0 and 30 days, 31 and 60, 61 and 90, and finally over 90

Advertisement