VbzCart/docs/queries/qryCat Items Stock

From Woozle Writes Code
< VbzCart‎ | docs‎ | queries
Jump to navigation Jump to search

About

SQL

<section begin=sql /><mysql>CREATE OR REPLACE VIEW qryCat_Items_Stock AS SELECT

 i.*,
 SUM(st.qtyForSale) AS qtyForSale,
 SUM(st.qtyForShip) AS qtyForShip

FROM (cat_items AS i LEFT JOIN qryStk_items_remaining AS st on i.ID=st.ID_Item) GROUP BY i.ID;</mysql> <section end=sql />