Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select
- sum(p.price) summ,
- count(c.id ) as cnt
- From contract_eshop.contract As c
- Inner Join contract_eshop.contract_sign As s On (c.sign_id=s.id)
- Inner Join contract_eshop.contract_status As cst On (c.status_id=cst.id)
- Inner Join contract_eshop.contract_sign_price_info As p On (s.price_info_id=p.id)
- where extract(year from s.comming_sign_date)=2023
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement