[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

order_by vs group_by what's diference /g/ ?

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 12
Thread images: 3

File: (Obraz PNG, 600 × 315 pikseli).png (10KB, 600x315px) Image search: [Google]
(Obraz PNG, 600 × 315 pikseli).png
10KB, 600x315px
order_by vs group_by
what's diference /g/ ?
>>
>>58404061
Read your textbook
>>
They aren't similar in the first place OP
>>
>>58404087
>>58404099
can't u just help me ?
i'm not asking much
>>
>>58404061
>>58404212
order_by orders your data
group_by groups your data
>>
>>58404061
One groups results of aggregate functions by column, the other orders results in ascending or descending order of a certain column. In future: http://www.w3schools.com/sql/

Now delete your shitty thread
>>
Order by is ordering the results, ex from high to low on ID
group by is grouping the resultset meaning everything with ex. ID 5 will be lumped together
>>
File: computer illiterate mongoloid.png (281KB, 501x1001px) Image search: [Google]
computer illiterate mongoloid.png
281KB, 501x1001px
>>58404061
>>
File: no.png (19KB, 253x300px) Image search: [Google]
no.png
19KB, 253x300px
>>58404352
>>
>>58404227
>>58404242
>>58404268
thx for help
>>
Fuck off pajeet
>>
>>58404061
One changes the order, one groups together for use with aggregate functions.

Protip: NEVER project fields besides the one(s) you're grouping by without aggregate functions. In reasonable SQL implementations this will cause an error, in MySQL this will just do who knows what.

Is this the learn programming reddit?
Thread posts: 12
Thread images: 3


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.