Skip to content

Instantly share code, notes, and snippets.

@black23
Created January 5, 2017 08:59
Show Gist options
  • Save black23/9e8c3cfc55b6b407b1832f415e0f29d3 to your computer and use it in GitHub Desktop.
Save black23/9e8c3cfc55b6b407b1832f415e0f29d3 to your computer and use it in GitHub Desktop.
SELECT count(*) as 'Počet vrácení'
FROM old_issues
JOIN borrowers on old_issues.borrowernumber = borrowers.borrowernumber
JOIN items ON old_issues.itemnumber = items.itemnumber
WHERE `old_issues`.`timestamp` != `old_issues`.`returndate`
AND DATE(old_issues .timestamp) BETWEEN <<Od|date>> AND <<Do|date>>
ORDER BY old_issues.timestamp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment