Hello,
I'm currently learning SQL and I need some help with the request below;
I currently have a Table called CUSTABLE1 with the following FIELDS: cus_name, cus_id, pur_date, sales_type, sales_total,
I need help making a query to export the fields above listing only when pur_date is between 1/1/16 – 1/31/16 where field sales_type = either "a" or "A"
Can the results of "a" and "A" of sales_total be sum and shown in 2 different columns?
Select custable1.cus_name, custable1.cus_id, custable1.pur_date, custable1.sales_type, custable1.sales_total;
from custable1 where custable1.pur_date > date(2016,01,01) and custable1.pur_date < date(2016,01,30);
into cursor temp1
The above is what I have so far, I can't figure out how to filter the custable1.sales_type and sum the sales_total either.
Any help will be much appreciated.
Thank you