Giter Site home page Giter Site logo

sql-and-no-sql's Introduction

#SQL

This is sql code will help to understand basic knowledge of the sql query

#There is some of basic query use for the to do the code

https://github.com/thecraigd/Python_SQL/blob/master/mysql.ipynb

##Basic SQL learn

https://www.w3schools.com/sql/default.asp

https://learnsql.com/blog/lead-and-lag-functions-in-sql/

https://www.tutorialspoint.com/sql/sql-create-database.html

###Master in database

https://github.com/at235am/cecs-323-practice-sql/blob/master/sql-practice-classics-model.sql

####Most interview question for the different interview

https://github.com/learning-zone

#Types of Window functions

Aggregate Window Functions

SUM(), MAX(), MIN(), AVG(). COUNT()

#Ranking Window Functions

RANK(), DENSE_RANK(), ROW_NUMBER(), NTILE()

mysql> select customerid,PaymentMethod,totalcharges,

-> RANK() OVER(PARTITION BY PAYMENTMETHOD ORDER BY TOTALCHARGES DESC) AS RANK_VALUE,

-> DENSE_RANK() OVER(PARTITION BY PAYMENTMETHOD ORDER BY TOTALCHARGES DESC) AS DENSEVALUE,

-> ROW_NUMBER() OVER(PARTITION BY PAYMENTMETHOD ORDER BY TOTALCHARGES DESC) AS ROWVALUE

-> FROM MYTABLE;

#Value Window Functions

LAG(), LEAD(), FIRST_VALUE(), LAST_VALUE()

#Syntax

window_function ( [ ALL ] expression ) OVER ( [ PARTITION BY partition_list ] [ ORDER BY order_list] )

window function link ---https://www.sqltutorial.org/sql-window-functions/

sql-and-no-sql's People

Contributors

satyambhatt5 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.