-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSQLQuery2.sql
More file actions
13 lines (12 loc) · 750 Bytes
/
SQLQuery2.sql
File metadata and controls
13 lines (12 loc) · 750 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
-- Query to clean whitespace issues in the ReviewText column
--USE PortfolioProject_MarketingAnalytics;
SELECT
ReviewID, -- Selects the unique identifier for each review
CustomerID, -- Selects the unique identifier for each customer
ProductID, -- Selects the unique identifier for each product
ReviewDate, -- Selects the date when the review was written
Rating, -- Selects the numerical rating given by the customer (e.g., 1 to 5 stars)
-- Cleans up the ReviewText by replacing double spaces with single spaces to ensure the text is more readable and standardized
REPLACE(ReviewText, ' ', ' ') AS ReviewText
FROM
dbo.customer_reviews; -- Specifies the source table from which to select the data