Complex sentence: In order to test database migration, SQL queries are created either by hand or using a tool, such as a query creator.The validation queries are created to run against both the source as well as the target databases.
Split into simpler sentences: In order to test database migration, you need to use SQL queries (created either by hand or using a tool e.g. a query creator). You need to create the validation queries to run against both the source as well as the target databases.