Advertisement
Guest User

Count query

a guest
Apr 9th, 2012
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.30 KB | None | 0 0
  1. SELECT COUNT( * ) FROM "messages" "me"  JOIN "users" "source_linked" ON "source_linked"."id" = "me"."source"  JOIN "users" "target_linked" ON "target_linked"."id" = "me"."target" WHERE ( ( ( "me"."source" = ? AND ( "me"."is_system" = ? OR "me"."is_system" IS NULL ) ) OR "me"."target" = ? ) ): '1', '0', '1'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement