wiki:izvestai

Version 3 (modified by 213209, 30 hours ago) ( diff )

--

Напредни извештаи од базата (SQL и складирани процедури)

Извештај за откжани резервации по ресторан.

select
    count(rh.cancellation_reason),
    au.first_name, 
    au.last_name, 
    au.membership_level, 
    au."role", 
    rh.cancellation_reason, 
    rh.restaurant_id 
from reservation_history rh  
inner join app_user au on rh.customer_id = au.id 
where rh.cancellation_reason = 'Canceled by user'
group by au.first_name, 
    au.last_name, 
    au.membership_level, 
    au."role", 
    rh.cancellation_reason, 
    rh.restaurant_id 
order by rh.cancellation_reason
Note: See TracWiki for help on using the wiki.