You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let pool = ctx.data::<Arc<PgPool>>().expect("Pool must be in context.");
119
119
120
120
let result :i64 = sqlx::query_scalar("SELECT count(*) AS updatecount FROM statusupdatehistory WHERE is_updated = TRUE and member_id=$1 and date BETWEEN $2 and $3;")
let pool = ctx.data::<Arc<PgPool>>().expect("Pool must be in context.");
132
+
133
+
let history = sqlx::query_as::<_,StatusUpdateHistory>(
134
+
"SELECT * FROM StatusUpdateHistory WHERE member_id = $1 AND date BETWEEN (SELECT MAX(date) FROM StatusUpdateHistory WHERE member_id = $1) - INTERVAL '6 months' AND (SELECT MAX(date) FROM StatusUpdateHistory WHERE member_id = $1);"
0 commit comments