How much time was spent at Subway?
select sum ( visits_restaurant.spent ) from visits_restaurant join restaurant on visits_restaurant.resid = restaurant.resid where restaurant.resname = "Subway"
How much time was spent at Honeygrow?
select sum ( visits_restaurant.spent ) from visits_restaurant join restaurant on visits_restaurant.resid = restaurant.resid where restaurant.resname = "Honeygrow"
Show me how much time was spent at each restaurant.
select restaurant.resname, sum ( visits_restaurant.spent ) from visits_restaurant join restaurant on visits_restaurant.resid = restaurant.resid group by restaurant.resid
Which restaurant had the least amount of time spent?
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 ) asc limit 1