There are two tables as cats and dogs with 'id' and 'name' for each pet in both tables. The schema can be understood from below:
TABLE 'dogs'
id INTEGER NOT NULL PRIMARY KEY,
name VARCHAR (50) NOT NULL
TABLE 'cats'
id INTEGER NOT NULL PRIMARY KEY,
name VARCHAR (50) NOT NULL
The question asks to 'Write a query that select all distinct pet.name'