The following method executes a select query on a table by passing parameters to the query. The results are then displayed on the screen. This code uses the Standard SQL dialect and not the legacy SQL:
Call this method in the main method and pass the required parameters. Customize the preceding method to make it more generic for your use case: