Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am struck on this query. I don't understand the Yes/No value part. I thinks it is done using CASE. Using the Northwind database write

I am struck on this query. I don't understand the Yes/No value part. I thinks it is done using CASE.

Using the Northwind database write a query that returns all customers, and for each return a Yes/No value depending on whether the customer placed orders on December 12, 2020

This is what I got so far:

SELECT DISTINCT c.CustomerID, c.CompanyName, CASE WHEN OrderDate = '2020-12-12' THEN 'YES' ELSE 'NO' END FROM Orders JOIN Customers as c ON Orders.OrderID = c.CustomerID GROUP BY c.CustomerID

image text in transcribed

Desired output: n+1 ima ca 1=424y

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What is American Polity and Governance ?

Answered: 1 week ago

Question

What is Constitution, Political System and Public Policy? In India

Answered: 1 week ago