Is this statement bloated? is there a better way of achieving the same thing?
Basically it grabs the date and value of a product SKU based on information in a couple of tables.
Basically it grabs the date and value of a product SKU based on information in a couple of tables.
SELECT ns_tracker_1_stat_log.STAMP, ns_tracker_sale_set.COST FROM ns_tracker_1_stat_log INNER JOIN ns_tracker_sale_set, ns_tracker_sale_item, ns_tracker_1_stat_sale ON ns_tracker_sale_item.NAME = '$sku' AND ns_tracker_sale_set.ITEM_ID = ns_tracker_sale_item.ID AND ns_tracker_sale_set.SALE_ID = ns_tracker_1_stat_sale.ID AND ns_tracker_1_stat_sale.LOG_ID = ns_tracker_1_stat_log.ID ORDER BY ns_tracker_1_stat_log.STAMP ASC
