Cafes and restaurants near the water

Hello

I need to query OSM through OverpassTurbo to get all the cafes and restaurants which are located specifically near the water (like coasts, beaches, shores).

I tried the following, but got 0 results:

[out:json][timeout:25];
(
  node["amenity"="cafe"]["waterway"="*"]({{bbox}});
  node["amenity"="cafe"]["water_place_access"="*"]({{bbox}});
  node["amenity"="cafe"]["water_place:access"="*"]({{bbox}});
  node["amenity"="cafe"]["beach"="*"]({{bbox}});

  node["amenity"="restaurant"]["waterway"="*"]({{bbox}});
  node["amenity"="restaurant"]["water_place_access"="*"]({{bbox}});
  node["amenity"="restaurant"]["water_place:access"="*"]({{bbox}});
  node["amenity"="restaurant"]["beach"="*"]({{bbox}});
);
out body;
>;
out skel qt;

Does anyone know how to query this correctly?

You are probably looking for something similar to the example “Highway around schools with inappropriate maxspeed” in here:

https://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_API_by_Example#Complex_Situations_of_Tagging_and_Geometry

You can forget about the maxspeed part, but it shows how to query objects near other objects.