DOC: More examples  comparison with sql
State: closed

- [ ] closes #xxxx
- [ ] tests added / passed
- [x] passes `git diff upstream/master | flake8 --diff`
- [x] whatsnew entry

added the following examples:
- Top N rows with offset
- Top N rows per group
- ROW_NUMBER() OVER(PARTITION BY day ORDER BY total_bill DESC)
- UPDATE
- DELETE


Labels:
name: Docs
name: IO SQL
description: to_sql, read_sql, read_sql_query

Comments:
pls don't close original PR's and open new ones, just push to the SAME one.

http://pandas.pydata.org/pandas-docs/stable/contributing.html

sorry, i'm new to GitHub stuff - have to learn how to deal with that

@jreback, how can i remove it?

just rebase on master

`git rebase -i origin/master`

i either have this error message:

[pandas_dev] C:\Users\Max\Anaconda3\envs\pandas-maxu777\doc>git rebase -i origin/master

It seems that there is already a rebase-merge directory, and
I wonder if you are in the middle of another rebase.  If that is the
case, please try
        git rebase (--continue | --abort | --skip)
If that is not the case, please
        rm -fr "C:/Users/Max/Anaconda3/envs/pandas-maxu777/.git/rebase-merge"
and run me again.  I am stopping in case you still have something
valuable there.

or that:

[pandas_dev] C:\Users\Max\Anaconda3\envs\pandas-maxu777\doc>git commit -m "restored original CONTRIBUTING.md"
interactive rebase in progress; onto 2267bd3
fatal: Could not open file .git/rebase-merge/done for reading: No such file or directory

i'm giving up - unfortunately i don't have that much time to play with `git`
:(

`git rebase --abort`

then try again

http://stackoverflow.com/questions/2047465/how-can-i-delete-a-file-from-git-repo

you can also do (you need to do the abort though)

`git rm contributing.MD --cached`

@jreback, i've pushed it now - is it OK now? 

not sure what you have pushed here, but doesn't look like its updated according to my comments.

@jreback, is it OK now?

any comments from those SQL inclined

## [Current coverage](https://codecov.io/gh/pydata/pandas/pull/12932?src=pr) is **83.91%**

> Merging [#12932](https://codecov.io/gh/pydata/pandas/pull/12932?src=pr) into [master](https://codecov.io/gh/pydata/pandas/branch/master?src=pr) will increase coverage by **+0.08%**

``` diff
@@           master     #12932   diff @@
========================================
  Files         135        136     +1   
  Lines       49664      49918   +254   
  Methods         0          0          
  Branches        0          0          
========================================
+ Hits        41610      41885   +275   
+ Misses       8054       8033    -21   
  Partials        0          0          
```
1. 5 files in `pandas/tseries` were modified. [more](https://codecov.io/gh/pydata/pandas/commit/d49cb5a1371dc132062a736c4cdee78fd61a119a/changes?src=pr#70616E6461732F74736572696573) 
   - Misses `+9` 
   - Hits `+108`
2. 2 files in `pandas/tools` were modified. [more](https://codecov.io/gh/pydata/pandas/commit/d49cb5a1371dc132062a736c4cdee78fd61a119a/changes?src=pr#70616E6461732F746F6F6C73) 
   - Misses `+1` 
   - Hits `+50`
3. 3 files in `pandas/core` were modified. [more](https://codecov.io/gh/pydata/pandas/commit/d49cb5a1371dc132062a736c4cdee78fd61a119a/changes?src=pr#70616E6461732F636F7265) 
   - Misses `-2` 
   - Hits `+2`
4. 3 files in `pandas` were modified. [more](https://codecov.io/gh/pydata/pandas/commit/d49cb5a1371dc132062a736c4cdee78fd61a119a/changes?src=pr#70616E646173) 
   - Misses `-2` 
   - Hits `+7`
5. File `.../core/categorical.py` (not in diff) was modified. [more](https://codecov.io/gh/pydata/pandas/commit/d49cb5a1371dc132062a736c4cdee78fd61a119a/changes?src=pr#70616E6461732F636F72652F63617465676F726963616C2E7079) 
   - Misses `-1` 
   - Partials `0` 
   - Hits `+1`

> Powered by [Codecov](https://codecov.io?src=pr). Last updated by d49cb5a

+1 on the SQL docs.

@jreback, thanks for the hint: `assign().query()` - i wasn't aware of `assign()` function

thanks!

FYI, I think somehow the `CONTRIBUTING.md` file got moved to `.github/CONTRIBUTING.md`; that's why it showed up. I removed that change.