Skip to content

Instantly share code, notes, and snippets.

View sudhirmohanraj's full-sized avatar

sudhir mohanraj sudhirmohanraj

View GitHub Profile
@sudhirmohanraj
sudhirmohanraj / README.md
Created October 16, 2016 15:56 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


Index:

@sudhirmohanraj
sudhirmohanraj / basic_operations.sql
Created February 6, 2016 01:10
Basic sql operations update,create,insert,delete
#INSERT INTO contributors (last_name, first_name, city, state, zip, amount) VALUES ('Buffet', 'Warren', 'Omaha', 'Nebraska', '68101', 1500);
#INSERT INTO contributors (last_name, first_name, city, state, zip, amount) VALUES ('Winfrey', 'Oprah', 'Chicago', 'IL', '60601', 500);
#INSERT INTO contributors (last_name, first_name, city, state, zip, amount) VALUES ('Chambers', 'Anne Cox', 'Atlanta', 'GA', '30301', 200);
#INSERT INTO contributors (last_name, first_name, city, state, zip, amount) VALUES ('Cathy', 'S. Truett', 'Atlanta', 'GA', '30301', 1200);
select * from contributors;
select city,state from contributors;
select distinct city,state,last_name from contributors where last_name like '%t';
select * from contributors where amount >= 1200;
@sudhirmohanraj
sudhirmohanraj / aggregate_function.sql
Created February 6, 2016 01:09
Basic Aggregate SQL Functions.
SELECT * FROM Owners.contributors;
#find all contributors from Georgia who have given more than $1000:
select * from contributors where state = 'GA' and amount > 1000;
#find all contributors who either live in Georgia or who have given more than $1000:
select * from contributors where state = 'GA' or amount > 1000;
#find all contributors who either live in Georgia or who have given more than $
select * from contributors where state in ('GA','IL') and amount > 1000;
#sorting results by order by
select distinct * from contributors where state in ('GA','IL') and amount > 1000 order by last_name,amount asc;