Changes between Version 12 and Version 13 of AdvancedConcepts


Ignore:
Timestamp:
06/16/26 02:58:08 (26 hours ago)
Author:
231119
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AdvancedConcepts

    v12 v13  
    6767{{{
    6868create or replace view vw_company_available_requests as
    69 select distinct
     69select
    7070       r.id as request_id,
    7171       r.customer_user_id,
    72        cus.username as customer_username,
    7372       r.timestamp,
    7473       r.number_of_adult_passengers,
     
    8079       r.baby_seat_count,
    8180       ca.company_id
    82 from request r
    83          join AppUser cus on r.customer_user_id = cus.id
    84          join area a on ST_Contains(a.coverage_polygon, r.start_location)
    85          join company_area ca on a.id = ca.area_id
    86 where r.status = 'pending';
     81from company_area ca
     82         join area a on ca.area_id = a.id
     83         join request r on ST_Intersects(a.coverage_polygon, r.start_location)
     84                        and r.status = 'pending';
     85select * from vw_company_available_requests where company_id = 3;
    8786}}}
     87
     88Резултантно време на извршување:
     89[[Image(2.png)]]
    8890
    8991**Динамична пресметка на цена преку просторна дистанца**