pastebin - collaborative debugging

pastebin is a collaborative debugging tool allowing you to share and modify code snippets while chatting on IRC, IM or a message board.

This site is developed to XHTML and CSS2 W3C standards. If you see this paragraph, your browser does not support those standards and you need to upgrade. Visit WaSP for a variety of options.

pastebin private pastebin - collaborative debugging tool What's a private pastebin?

Posted by frymaster on Mon 14th Jan 23:20
download | new post

  1. SELECT *,stonemined / didiff AS ratio FROM
  2.     (SELECT playerid AS p2, count(playerid) AS diamondsmined, diamondsreplaced, COUNT(playerid) - IFNULL(diamondsreplaced,0) AS didiff FROM `lb-NE-2013`
  3.     LEFT JOIN
  4.         (SELECT playerid AS p1,count(playerid) AS diamondsreplaced FROM `lb-NE-2013` WHERE type = 56 GROUP BY playerid) AS q1
  5.     ON playerid = p1
  6.     WHERE replaced = 56 GROUP BY playerid) AS q2
  7. JOIN
  8.     (SELECT playerid AS p3,COUNT(playerid) AS stonemined FROM `lb-NE-2013`
  9.     WHERE replaced = 1 GROUP BY playerid) AS q4
  10.     ON p2=p3
  11. JOIN
  12.     `lb-players`
  13.     ON p2=`lb-players`.playerid
  14. ORDER BY ratio ASC;

Submit a correction or amendment below. (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Use syntax highlighting

To highlight particular lines, prefix each line with @@

Remember my settings