a guest Jan 22nd, 2020 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. select if(month(date)=12,"Декабрь",if(month(date)=1,"Январь","Што")) month, brand, art_num from (
  2. select, date(date_create) date, pa_id, br.NAME_BRANDS brand, pa.art_num
  3. from orders o
  4. LEFT JOIN order_cars oc on
  5. LEFT JOIN order_product op on
  6. LEFT JOIN prices_all pa on
  7. left join brand_all br on pa.brand_id =
  8. where date_create >= "2019-12-01"
  9. and o.order_delivery_id = 3
  10. and is not null and op.car_id is not null
  11. ) a group by month, brand, art_num
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand