select product_name, product_abbreviation, product_sku_id from Product_Table order by product_abbreviation; SELECT tattoo_abbreviation, sum(tattoo_tally) AS totalCount FROM Tattoo_Table GROUP BY tattoo_abbreviation ORDER BY totalCount DESC; SELECT tattoo_product_id, tattoo_abbreviation, sum(tattoo_tally) AS totalCount FROM Tattoo_Table GROUP BY tattoo_product_id ORDER BY totalCount DESC; SELECT tattoo_product_id, tattoo_abbreviation, sum(tattoo_tally) AS totalCount FROM Tattoo_Table GROUP BY tattoo_product_id ORDER BY tattoo_abbreviation DESC; SELECT product_name, tattoo_product_id, tattoo_abbreviation, sum(tattoo_tally) AS totalCount FROM Tattoo_Table LEFT JOIN Product_Table ON product_sku_id = tattoo_product_id WHERE tattoo_abbreviation = 'avws' GROUP BY tattoo_product_id ORDER BY totalCount DESC; SELECT product_name, tattoo_product_id, tattoo_abbreviation, sum(tattoo_tally) AS totalCount FROM Tattoo_Table LEFT JOIN Product_Table ON product_sku_id = tattoo_product_id WHERE tattoo_abbreviation LIKE 'avws' GROUP BY tattoo_product_id ORDER BY tattoo_abbreviation DESC SELECT tattoo_product_id, tattoo_abbreviation, sum(tattoo_tally) AS totalCount FROM Tattoo_Table GROUP BY tattoo_abbreviation, tattoo_product_id ORDER BY tattoo_abbreviation DESC describe Tattoo_Table +---------------------+-----------------------+------+-----+------------+----------------+ | Field | Type | Null | Key | Default | Extra | +---------------------+-----------------------+------+-----+------------+----------------+ | tattoo_id | int(10) unsigned | | PRI | 0 | auto_increment | | tattoo_datestamp | date | | MUL | 0000-00-00 | | | tattoo_tally | mediumint(8) unsigned | | | 0 | | | tattoo_abbreviation | char(4) binary | | MUL | | | | tattoo_version | tinyint(2) unsigned | | MUL | 0 | | | tattoo_date | date | | MUL | 0000-00-00 | | | tattoo_site | char(5) | | MUL | | | | tattoo_product_id | smallint(5) unsigned | | MUL | 0 | | +---------------------+-----------------------+------+-----+------------+----------------+ describe Product_Table +------------------------------+-------------------------------+------+-----+------------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------------------------+-------------------------------+------+-----+------------+----------------+ | product_id | smallint(5) unsigned | | PRI | 0 | auto_increment | | product_name | varchar(50) | | MUL | | | | product_category_table_id | tinyint(3) unsigned | | MUL | 0 | | | product_subcategory_table_id | tinyint(3) unsigned | | MUL | 0 | | | product_sku_table_id | tinyint(3) unsigned | | MUL | 0 | | | product_sku_id | smallint(5) unsigned zerofill | | UNI | 00000 | | | product_abbreviation | varchar(4) | | MUL | | | | product_version | tinyint(2) unsigned | | | 10 | | | product_date | date | | | 0000-00-00 | | | product_group_owner | varchar(30) | | | | | | product_studio | varchar(30) | | | | | | product_filename | varchar(255) | | | | | | product_icon | varchar(255) | | | | | | product_timestamp | timestamp(12) | YES | | NULL | | | product_history | tinytext | | | NULL | | | product_notes | tinytext | | | NULL | | +------------------------------+-------------------------------+------+-----+------------+----------------+