Write SQL query to solve given problem: What is the percentage of restaurants that serve American food in Dublin city?. Keep the solution inside sql tag ```sql [SQL-Query] ```
SELECT CAST(SUM(IIF(food_type = 'american food', 1, 0)) AS REAL) * 100 / COUNT(id_restaurant) FROM generalinfo WHERE city = 'dublin'