Support/Interesting queries: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 8: Line 8:


  SELECT DATE(FROM_UNIXTIME(commentDate)) d, COUNT(*) c FROM tiki_comments WHERE  objectType = 'forum' GROUP BY d ORDER BY d;
  SELECT DATE(FROM_UNIXTIME(commentDate)) d, COUNT(*) c FROM tiki_comments WHERE  objectType = 'forum' GROUP BY d ORDER BY d;
==Instances of a pattern==
Finds the most common strings in forum posts that match the pattern given.
echo "SELECT data FROM tiki_comments WHERE objectType = 'forum' AND data LIKE '%.dll%'" > test.sql
mysql -u root sumo < ./test.sql > output.txt
grep -o "\S*\.dll" output.txt > output2.txt
sort output2.txt | uniq -c | sort -nr > report.txt
103

edits

Navigation menu