Select Units Sold and Total Units Sold from a Sales record table
You need a conditional aggregate using CASE:

SELECT sr.itemID, sr.itemname,
   SUM(sr.itemunits) AS "Total Units Sold", 
   SUM(CASE WHEN date='2016-04-14' THEN sr.itemunits END) AS "Units Sold"
FROM salesrecord AS sr
WHERE date &lt;= '2016-04-14'
GROUP BY sr.itemID, sr.itemname


I used a table-alias sr which improves readability.

And I added sr.itemID to GROUP BY, which is compliant with Standard SQL (and the latest version of MySQL)