How would you write a query to calculate the number of open defects by priority for Applied Data Finance?