I have a table, named "Pancakes" with about 15,000 rows.
Within the table Pancakes there are the columns: [syrup], [diameter], [kitchen], [chef], and order amount.
Problem: Partially duplicate rows.
I can identify the partially duplicate rows by the [chef] value, [order amount] value, and [kitchen] value.
All the partially duplicate rows have a [chef] = "05" but so do some of the non duplicate rows, which also have various numbers.
All the partially duplicate rows have an [order amount] ="0" but so do some of the non duplicate rows, which also have various numbers.
I can manually ID the duplicate rows by counting which [kitchen] values are greater or equal to 2. Then finding which rows have a [chef] = 05 and an [order amount] = 0.
How would I go about writing a query to find and delelte the partially duplicate rows or automatically filtering the table data?
Could I write a SQL query to find all the values where If(kitchen[Chef]=05 AND [order amout]=0
Code:
SELECT *
FROM Pancakes
WHERE Pancakes.[Chef]=05 AND Pancakes.[Order Amount]=0 AND (Select * FROM Pancakes WHERE HAVING Pancakes.Kitchen >=2;