CREATE TABLE student (stuid NUMBER, lname CLOB, fname CLOB, age NUMBER, sex CLOB, major NUMBER, advisor NUMBER, city_code CLOB)
CREATE TABLE visits_restaurant (stuid NUMBER, resid NUMBER, time TIME, spent NUMBER)
CREATE TABLE restaurant_type (restypeid NUMBER, restypename CLOB, restypedescription CLOB)
CREATE TABLE type_of_restaurant (resid NUMBER, restypeid NUMBER)
CREATE TABLE restaurant (resid NUMBER, resname CLOB, address CLOB, rating NUMBER)

At which restaurant did the students spend the least amount of time? List restaurant and the time students spent on in total.
SELECT restaurant.resname, SUM(visits_restaurant.spent) FROM visits_restaurant JOIN restaurant ON visits_restaurant.resid = restaurant.resid GROUP BY restaurant.resid ORDER BY SUM(visits_restaurant.spent) LIMIT 1
SELECT "restaurant"."resname", SUM("visits_restaurant"."spent") FROM "visits_restaurant" JOIN "restaurant" ON "restaurant"."resid" = "visits_restaurant"."resid" GROUP BY "restaurant"."resid" ORDER BY SUM("visits_restaurant"."spent") FETCH FIRST 1 ROWS ONLY