Help for this page

Select Code to Download


  1. or download this
    select id, url, images, Total
    from (
    ...
        limit 10
    ) last10
    order by Total desc;
    
  2. or download this
      select Customers.name, sales.amount                     -- select na
    +me and total amount spent. 
      from Customers, 
    ...
      ) sales                                                 -- we name t
    +his sub-select "sales".
      where sales.customer_id = Customers.id                  -- we INNER 
    +JOIN the two "tables", 
                                                              -- so we can
    + cross-reference Orders against Customers.