Working SQL queries for repositories analysis