added test for .bg_window_sql