Example SQL queries for reports
Technical staff at your organization can refer to easy examples of SQL queries to know which types of ezyVet data they can get from ezyVet Data Lake.
SQL query for an invoice report
- The ID of each invoice
- The date that a person made each invoice
- The total quantity of each invoice
- The unpaid quantity of each invoice
- The number of payments made foe each invoice
- The date of the most recent payment of each invoice
- The number of invoice line items of the invoice
- The first name and last name of the client of each invoice
SQL query for a user accounts report
- Each user account
- The name of each person of each user account
- The username of each person of each user account
- The permissions role of each user account
SQL query for a clinical records report
- Each clinical record and its code
- The date the a person made each clinical record
- Each patient and breed of each clinical record
- The primary veterinarian of each clinical record
- The date of birth of each patient of each clinical record
- If the patient of each clinical record is deceased
- The total quantity that the organization invoiced for the procedures and products of each clinical record