I am trying to display the min and max total order of item based on the restaurant. I am able to display the min and max of the total order base on this code.

```
(SELECT mx.name, max(mx.total) Max_order
FROM
   (SELECT     m.name, sum(ol.quantity_order) total
    FROM       menu m, orderlist ol
    WHERE      ol.menu_id = m.menu_id
    GROUP BY   m.name, ol.menu_id) mx
GROUP BY mx.name 
ORDER BY Max_order desc
OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY)
UNION ALL
(SELECT mn.name, min(mn.total) Max_order
FROM
    (SELECT     m.name, sum(ol.quantity_order) total
     FROM       menu m, orderlist ol
     WHERE      ol.menu_id = m.menu_id
     GROUP BY   m.name, ol.menu_id) mn
GROUP BY mn.name 
ORDER BY Max_order asc
OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY);

```

But when I tried to display based on restaurant i am unable to display the min and max item ordered

```
(SELECT  m.menu_id, m.name, fin.Max_order AS
         Total_Order
FROM
    (SELECT mx.name, max(mx.total) Max_order
    FROM
       (SELECT     m.name, sum(ol.quantity_order) total
        FROM       menu m, orderlist ol
        WHERE      ol.menu_id = m.menu_id
        GROUP BY   m.name, ol.menu_id) mx
    GROUP BY mx.name 
    ORDER BY Max_order desc
    OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY)
    UNION ALL
    (SELECT mn.name, min(mn.total) Max_order
    FROM
        (SELECT     m.name, sum(ol.quantity_order) total
         FROM       menu m, orderlist ol
         WHERE      ol.menu_id = m.menu_id
         GROUP BY   m.name, ol.menu_id) mn
    GROUP BY mn.name 
    ORDER BY Max_order asc
    OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY)fin
WHERE    ol.menu_id = m.menu_id AND
         m.restaurant_id = r.restaurant_id AND
         r.restaurant_name = &Restaurant
ORDER BY fin.Max_order
OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY);

```

This is the error that i got but i am pretty sure that i had close everything correctly.

```
ERROR at line 22:
ORA-00907: missing right parenthesis

```