Writing Database Queries

You can use the schema information to write queries and create custom reports based on the same data. For example, the following query returns a list of the groups on a Vocera server by extracting values from the GroupName column of the groups table:

select GroupName from groups;
Figure 1. Querying groups

Here's an example of how to get related data from two tables. The following query returns speech recognition scores for a specified user:

select r.score, u.FirstName, u.LastName 
from recresults r, users u 
where r.UserID='rhall' and u.UserID='rhall';

This query returns rows from both tables where the value of the UserID field is rhall.

Figure 2. Querying related data from two tables