Reputation: 583
trying to query a table in DB.
%sql SELECT 'Status' FROM checkins_csv WHERE 'Status' IS NOT NULL;
getting back the following:
Not sure what I'm doing wrong and not seeing data?
Upvotes: 0
Views: 146
Reputation: 6454
The single quotes think you are making a pseudo (string) column in your results. You just need to remove the single quotes in your query:
%sql
SELECT status FROM checkins_csv WHERE status IS NOT NULL;
To better illustrate, run this too, which creates two additional columns:
%sql
SELECT 'Bacon', 1, status FROM checkins_csv WHERE status IS NOT NULL;
Upvotes: 1