From the course: Complete Guide to Advanced SQL Server

Unlock the full course today

Join today to access over 24,600 courses taught by industry experts.

Solution: Import a DataFrame

Solution: Import a DataFrame

I hope you were able to come up with a script that satisfied the challenges requirements. Here's how I go about completing the task. The first thing I want to do is take a look inside the WideWorldImporters database to get a feel for the data that we're looking at. And that was in the table warehouse colors. Let's go ahead and right click on it and choose Select top 1000 rows. So this returns everything that's in the table. We have all the different columns. But the only ones that we're interested in are the color name and the color ID column. So let's go ahead and write a new query here. And we'll select out just those two columns from the table. So we're going to SELECT ColorName and ColorID, and that's from the Warehouse.Colors table. Now, the challenge also asked for only the records where the color ID was greater than 20. And we can do that with a WHERE clause here in our SELECT statement. So I'll say, WHERE ColorID is greater than 20. I'm going to execute this query to see the…

Contents