You are given daily ping counts from Athelas device telemetry. Write a PostgreSQL query that flags anomalous days per device by comparing each day to the previous available day and by detecting gaps in the daily sequence. Return one row per device-day with the current count, the previous count, the day-over-day change, a gap flag, and an anomaly label. Treat a day as anomalous when the ping count changes by more than 50% versus the previous available day, or when there is a gap of more than 1 day between consecutive records for the same device. Keep the result ordered by device and date.