Skip to content
Advertisement

Tag: group-by

In the SQL Query I couldn’t get truly data

Hi, I have a facilities table. I want to know which hotel_id has 2 facilities at the same time. with that no record. Answer Your query does not work because you are looking for rows that satisify both conditions simultaneously, which cannot happen. You need to look across rows of the same group. Instead, you can filter on rows that

MS SQL Find a Value in entire column and return true if found

New to SQL trying to find how to do the following : I have a ProductID# ABC123 (Product) I need to check the “workflow” (Workflow) column and see if the Product ID was ever “extended” – there are various workflow steps – Need to check the entire workflow column, if a ProductID was ever “extended” I need to mark “yes”

Advertisement