Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
SELECT IF(COUNT(*)>0, 1 , 0) FROM `INFORMATION_SCHEMA`.`TABLES` WHERE `TABLE_NAME`='projects'
DESCRIBE `projects`
SELECT COUNT(*) AS `rowcount` FROM `projects` WHERE `projects`.`state` = 'In Triage' AND `projects`.`date_updated` >= 1368316903
SELECT `projects`.`id`, `projects`.`name`, `projects`.`description`, `projects`.`projected_member_benefit`, `projects`.`projected_business_benefit`, `projects`.`priority`, `projects`.`dependencies`, `projects`.`ideation_date`, `projects`.`requested_delivery_date`, `projects`.`state`, `projects`.`project_lead_id`, `projects`.`delivery_lead_id`, `projects`.`portfolio_id`, `projects`.`program_id`, `projects`.`department_id`, `projects`.`pillar_id`, `projects`.`creator_id`, `projects`.`worklenz_number`, `projects`.`date_created`, `projects`.`date_updated` FROM `projects` INNER JOIN `projects_iterations` ON `projects`.`id` = `projects_iterations`.`project_id` WHERE `projects`.`state` = 'In Progress' AND `projects_iterations`.`release_date` >= 1368576103 ORDER BY `projects_iterations`.`release_date` ASC
SELECT COUNT(*) AS `rowcount` FROM `projects` WHERE `projects`.`state` = 'In Backlog'
SELECT `projects`.`id`, `projects`.`name`, `projects`.`description`, `projects`.`projected_member_benefit`, `projects`.`projected_business_benefit`, `projects`.`priority`, `projects`.`dependencies`, `projects`.`ideation_date`, `projects`.`requested_delivery_date`, `projects`.`state`, `projects`.`project_lead_id`, `projects`.`delivery_lead_id`, `projects`.`portfolio_id`, `projects`.`program_id`, `projects`.`department_id`, `projects`.`pillar_id`, `projects`.`creator_id`, `projects`.`worklenz_number`, `projects`.`date_created`, `projects`.`date_updated` FROM `projects` INNER JOIN `projects_iterations` ON `projects`.`id` = `projects_iterations`.`project_id` WHERE `projects`.`state` = 'Completed' AND `projects_iterations`.`release_date` >= 1368576103 AND `projects_iterations`.`release_date` >= 1359698400 ORDER BY `projects_iterations`.`release_date` ASC
SELECT COUNT(*) AS `rowcount` FROM `projects`
SELECT IF(COUNT(*)>0, 1 , 0) FROM `INFORMATION_SCHEMA`.`TABLES` WHERE `TABLE_NAME`='departments'
DESCRIBE `departments`
SELECT `departments`.`id`, `departments`.`name` FROM `departments`
SELECT IF(COUNT(*)>0, 1 , 0) FROM `INFORMATION_SCHEMA`.`TABLES` WHERE `TABLE_NAME`='portfolios'
DESCRIBE `portfolios`
SELECT `portfolios`.`id`, `portfolios`.`name`, `portfolios`.`owner`, `portfolios`.`date_created`, `portfolios`.`active` FROM `portfolios`
SELECT `projects`.`id`, `projects`.`name`, `projects`.`description`, `projects`.`projected_member_benefit`, `projects`.`projected_business_benefit`, `projects`.`priority`, `projects`.`dependencies`, `projects`.`ideation_date`, `projects`.`requested_delivery_date`, `projects`.`state`, `projects`.`project_lead_id`, `projects`.`delivery_lead_id`, `projects`.`portfolio_id`, `projects`.`program_id`, `projects`.`department_id`, `projects`.`pillar_id`, `projects`.`creator_id`, `projects`.`worklenz_number`, `projects`.`date_created`, `projects`.`date_updated` FROM `projects` WHERE `projects`.`id` = 46675 LIMIT 1
SELECT IF(COUNT(*)>0, 1 , 0) FROM `INFORMATION_SCHEMA`.`TABLES` WHERE `TABLE_NAME`='contributions'
DESCRIBE `contributions`
SELECT COUNT(*) AS `rowcount` FROM `contributions` WHERE `contributions`.`project_id` = :0
SELECT IF(COUNT(*)>0, 1 , 0) FROM `INFORMATION_SCHEMA`.`TABLES` WHERE `TABLE_NAME`='discoveries'
DESCRIBE `discoveries`
SELECT COUNT(*) AS `rowcount` FROM `discoveries` WHERE `discoveries`.`project_id` = :0
SELECT IF(COUNT(*)>0, 1 , 0) FROM `INFORMATION_SCHEMA`.`TABLES` WHERE `TABLE_NAME`='reviews'
DESCRIBE `reviews`
SELECT COUNT(*) AS `rowcount` FROM `reviews` WHERE `reviews`.`project_id` = :0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.