Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding initial draft of Quick SQL Tricks Guide #319

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

michellechandra
Copy link
Contributor

cc @ohasselblad

@michellechandra michellechandra self-assigned this Jun 10, 2016
Michelle Chandra added 2 commits June 10, 2016 14:19
@michellechandra
Copy link
Contributor Author

hey @ohasselblad - let me know what you think of this initial draft and if I should add anything :)

Wondering if I should explain the WHERE operator? Casting? Alias? Etc?


The 'DB' part of CartoDB means that it is built on a database called [PostgreSQL](https://www.postgresql.org/docs/9.5/static/index.html). PostgreSQL's programming language is SQL, an acronym for structured query language, which is a powerful and popular language for analyzing tables of data. This reference guide provides several SQL queries and operations that you can easily use as part of your data analysis workflow. If you are new to SQL, first review lesson one of this series, [SQL and PostGIS in CartoDB Editor](https://academy.cartodb.com/courses/sql-postgis/intro-to-sql-and-postgis/).

## Basic Math Queries
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to have an example dataset that you can use the whole way so people can follow along and produce some of the results.

Copy link
Contributor Author

@michellechandra michellechandra Jun 16, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, let me search the Data Library for an appropriate dataset

@andy-esch
Copy link
Contributor

Nice list, @michellechandra 👍

A few thoughts:

  1. more crosslinking to our other resources (academy, tutorials)
  2. Yeah, basic WHERE would be cool, and could reference the first sql lesson. Talking about AND and OR logic would be nice as well.
  3. Yep, I like casting
  4. Yep, I like aliasing :)
  5. Measuring distances in meters (casting to ::geography type, could be good)

@michellechandra
Copy link
Contributor Author

Was going to not review anything PostGIS related, would there be a way to discuss the geography type using just a SQL query that would be relevant? Or should that be saved for a different guide that is PostGIS tricks?

@andy-esch
Copy link
Contributor

Good point, let's do a different guide on PostGIS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants