ModelName Fitness Tracker

Track workouts, nutrition, body measurements, goals, streaks, and trends.

Local storage active

Profile & Daily Targets

Set your body stats and targets. Use “Auto calorie target” to estimate a maintenance or goal calorie level.

Today

Insights

    Daily Activity & Recovery

    Quick Add

    Jump directly to logging tools.

    ``` --- # FILE 2 — `modelname_health_analytics.html` Save this as: ```txt modelname_health_analytics.html ``` ```html ModelName Health Analytics Dashboard

    ModelName Health Analytics Dashboard

    SQL analytics, sample insights, and visual health trend reporting.

    This demo uses generated sample data. The SQL queries are written for PostgreSQL-style databases and can be adapted for MySQL with minor date-function changes.

    Recommended Schema

    
          

    Executive Health Summary

    Calorie In vs Out — Weekly

    Cumulative Net Calories

    Weight Trajectory

    Macro Distribution

    Workout Frequency & Intensity

    Goal Progress

    Actionable Insights

      SQL Query 1 — Calorie Deficit/Surplus Over Time

      Returns daily calories in, calories out, net calories, and cumulative net calories. Useful for detecting whether a user is consistently in deficit, surplus, or maintenance.

      
            

      SQL Query 2 — Workout Frequency and Intensity Trends

      Aggregates weekly workout count, total minutes, average intensity, and calories burned. Useful for spotting declining consistency or overload.

      
            

      SQL Query 3 — Weight Loss/Gain Trajectory and Target Date

      Calculates current weight, goal weight, average weekly change, and projected goal date when the trend is moving toward the goal.

      
            

      SQL Query 4 — Macro Distribution Pie Chart

      Converts macro grams to calories and returns protein/carb/fat percentages. Useful for pie charts and diet composition analysis.

      
            

      SQL Query 5 — Activity Streaks

      Calculates current and longest consecutive-day logging streaks across workouts, nutrition, and daily logs.

      
            

      SQL Query 6 — Goal Progress Percentages

      Calculates progress toward weight, workout frequency, step, sleep, and calorie-deficit goals.