SQL exercises
Language 
August 18, 17:26 MSK
Login:

Password:

forgot password?
Registration

Transact-SQL tests
Personal page
Developers & Thanks
For employers
References
Feedback
Support SQL-EX.RU



Poll
Would you get the following certificate?
Yes
No
Such certificate is necessary on a site, but not for me
Probably I would get it for supporting the project
Such certificate is unnecessary one



View Results


Сколько стоит адвокат по уголовным делам
Адвокат по уголовным делам. Профессиональная помощь. Звоните
zabolotnyy.ru

Аль факер
аль факер
alfakher.su

купить шеллак в интернет магазине недорого с доставкой. Звоните 8-800-234-2302
buy-nail.com

SQL Exercises news letters, latest issue

#671 (2017-08-12)

Week news

§
As the important news can appear and between releases of news letters, I shall use this page for the publication of the information on all changes on the site.
The forum is not so suitable for this purpose since the message there "escapes" and can appear on previous page before it will lose a urgency.
So look in here if you wish to be well informed about last events on the site. The link to this page is in section of news at the main page below a subscription banner.
§
New version of mobile application from Dmitry Ponomarenko is now available for work with site forums and more. Try this.

§
The most popular topics of the forum
Topic        Messages
§
Authors of the week in the forum
Author	Messages
Copoka		8
selber  	7
Kursist		6
pegoopik  	5
KovalFA		3
§
Available competitions on query optimization
Exercise	Date	     Author
147	2012-02-23	$erges
159	2012-07-25	anddros
170	2011-07-15	qwrqwr
182	2012-02-16	Baser
192	2012-03-03	Baser
197	2014-11-06	pegoopik
214	2015-06-24	pegoopik
259	2012-07-23	anddros
§
Additional non-optimization competitions
Exercise	Date	Author/Organizer of competition
71	2010-12-26	anddros (closed)
88	2012-07-12	crescent/Pegoopik  (closed)
91	2012-05-31	smog/$erges
102	2016-07-04	GriGrim/pegoopik
121	2012-07-06	ZrenBy/anddros
153	2010-09-21	Ozzy
§
Changes among leaders (solved exercises of third stage):
13. smog (157)
33. BW (193)
§
Have to solve last exercise 138 for passing to the third stage:
126. MikhailFG (tasks 137, time 98.650)

§
Applicants for Top 100 have advanced in rating:
123. wqer (138, 105.279)
126. MikhailFG (137, 98.650)
137. y4nzi (132, 13.500)
143. Gosha (133, 352.131)
156. Auriga_dorado (118, 39.156)
173. Masha279 (122, 85.432)
194. SPMV (113, 969.879)
§
Statistics:
Number of subscribers - 2991
Number of rating's participants - 11863
Number of second-stage's participants - 3016
Number of third-stage's participants - 120
On the learning stage - 223221
Certified specialists in total - 777

ТОР 20

NoPersonNumber of
Sel_ex
Last_SelNumber of
DML_ex
ScoresDaysDays_2Days_3S_3LastSolvedLastVisit
1Bezhaev A.Yu. (Baser)1258225316302636199.973177.3102272017-07-202017-08-11
2Krasovskij E.A. (pegoopik)1258306316292564208.77912.6672262017-07-152017-08-11
3Kreslavskij O.M. (Arcan)1257306316283818261.321203.7052252017-07-162017-08-11
4Dubinskij A.V. (_velial)12552203062427102793.3903368.3692252017-04-152017-08-08
5Boiko D. (Angellore)12523052961535124677.3333268.2362182017-03-232017-05-03
6Karasyova N.V. (vlksm)1251221306134008275.181226.9262142017-05-042017-07-21
7Kostomarov A.V. (al29)72352233057819191835.7821403.1442052017-07-272017-08-04
8Filippkin D.V. (_dimon_)1245115295982737194.624127.9092022016-07-202016-09-29
9Kurochkin P.A. (qwrqwr)1245306315952804250.323159.3151952017-07-152017-08-09
10Movlyanov A.P. (Oct)7245102958913072353.7512448.8471932017-01-232017-04-03
11Sal'nikov S.A. ($erges)122820625552253317.53314.4981812015-02-022017-04-13
12Yatsuk A.A. (Faust_zp)1187255244601984144.150108.8401372012-07-122012-07-30
13Kukushkin S.A. (smog)92191572950623131011.1201078.4311312017-08-092017-08-11
14Kuznetsov V.S. (herrRo)1172260234191167478.51173.3351222012-02-082013-06-18
15Grinkevich D.L. (Dmitrij Grinkevich)1320510274682059367.305932.3431092017-05-312017-07-21
16Drozdkov A.N. (anddros)51931624446224412.34111.0911082014-07-212015-01-29
17Shindin A.V. (AlShin)114825223367928408.505777.457992011-05-052014-05-18
18Vyazovetskov A.S. (alex_v)15177187234063246123.34242.620972015-04-282015-06-05
19Timofeeva E.V. (Umrikhina)12061031480338150.38047.237962017-07-272017-07-21
20Tarasov D.B. (Gavrila)916515233942427151.34399.710952012-04-232012-05-25

Best results for last week

Nosurnamen_selsel_allsel_scoresdml_scoresscoresratinglast_visit
1>Maria (Manyashka)26655005062411 Aug 2017
2>Smirnov A.S. (vvorkandrey)124024024106511 Aug 2017
3>Aliev R. (y4nzi)101322182913711 Aug 2017
4>Dyakonova E. (SiberianGirl)93515015109511 Aug 2017
5>Abdulmanapov A. (Dvarik)112114014175011 Aug 2017
6>Plugin V. (Basilik)5471201288211 Aug 2017
7Kislyakov V.V. (KVV)54011314137810 Aug 2017
8>Kozlova M. (Auriga_dorado)41181001015611 Aug 2017
9>Vinogradova S.M. (Tigra1)5741001039911 Aug 2017
10Antonovich M. (Masha279)312280817309 Aug 2017
11Dodonov V.E. (Vladislav Dodonov)732808128910 Aug 2017
12>Belov (mbelov1567)426808149211 Aug 2017
13Vorob'eva T.S. (tushktanchik)51471118332610 Aug 2017
14Shutov (vctrl)325707151411 Aug 2017
15>Ex (lokxy)518707378011 Aug 2017
16>Skokleenko (DCman1993)55707562111 Aug 2017
17Pantileenko D. (iriswind1)343606101111 Aug 2017
18Grishaev P.B. (Pavel Borisovich)55606587911 Aug 2017
19chernyaev R.Yu. (Svenfischer1988)58527292510 Aug 2017

Let's learn SQL

MySQL. Usage of query variables

E.A. Krasovskiy

People rather often ask whether there are equivalents for analytic (windowing) functions in MySQL. No, there are not. To replace them, self join queries, complex subqueries, etc, are used. Most of such workarounds turn out to be ineffective.

There are no recursive queries in MySQL either. However, a part of problems usually solved by analytic functions or recursive queries can be handled by features available in MySQL.

One of these features is the unique mechanism of processing variables within a SQL query, which is very unusual for other DBMS. In MySQL, you can declare a variable within a query, change its value, and put it into the result set of the SELECT statement for output. And the most notable thing is, the processing order for query rows, and thus the order values are assigned to variables, can be defined by custom sorting!

Note: this article implies expressions within the SELECT statement are processed in order from left to right; however, there is no confirmation of such a processing order in the official MySQL documentation. You need to keep that in mind when switching from one server version to another. To ensure the required evaluation order, a fake CASE or IF statement can be used.

Read more:
Equivalent of recursive CTEs
Equivalents for analytic functions
Performance

Useful links

§ All articles from news letters are putting on the site Books and articles about SQL thereafter.

§ We invite you to visit the Interactive SQL textbook.
    The resource is positioned as a "handbook" for this site SQL-EX.COM, but can be used irrespective of it also.

§ The following DBMS are used on the site for solving exercises: SQL Server 2012 Express, Oracle Database 11g Express Edition, MySQL 5, PostgreSQL 9.

§ If you like this site, vote for us:
del.icio.us
dzone.com
Digg.com
stumbleupon.com



Home
Week news
Profile
References
Rambler's Top100
Copyright SQL-EX © 2002-2017. All rights reserved.
contact