Changed query to use DW