Implemented queries to display results in mainwindow table.