Advertisement
kieni17

Untitled

Apr 8th, 2020
438
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PL/SQL 0.26 KB | None | 0 0
  1. EXPLAIN EXTENDED SELECT p.posttypeid, COUNT(p.id), COUNT(c.id) FROM posts p, comments c, users u
  2. WHERE c.postid = p.id AND u.id = p.owneruserid AND u.reputation > 100
  3. AND NOT EXISTS (SELECT * FROM postlinks l WHERE l.relatedpostid = p.id)
  4. GROUP BY p.posttypeid;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement