{"id":196692,"date":"2013-10-07T22:27:03","date_gmt":"2013-10-07T18:27:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=196692"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=196692","title":{"rendered":"<span class=\"post_title\">Tips &#038; tricks for MySQL. \u0420\u0430\u0431\u043e\u0442\u0430 \u0441 SQL<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0437\u0430\u0434\u0443\u043c\u0430\u043d\u0430 \u043c\u043d\u043e\u0439 \u043a\u0430\u043a \u0441\u0431\u043e\u0440\u043d\u0438\u043a \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 SQL \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0411\u0414 MySQL, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u043f\u043b\u043e\u0445\u043e \u043e\u0441\u0432\u0435\u0449\u0435\u043d\u043d\u044b\u0445 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435. \u0422\u0430\u043a, \u0438\u0437 \u0441\u0442\u0430\u0442\u044c\u0438 \u0432\u044b \u0443\u0437\u043d\u0430\u0435\u0442\u0435 \u043e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 with rollup, \u0438 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u044b in \u0438 not in \u043d\u0430 join&#8217;\u044b, \u0430 \u0442\u0430\u043a \u0436\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445 \u2014 \u043e\u0434\u043d\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c, \u0438 \u043c\u043d\u043e\u0433\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0435. \u041d\u0430\u0447\u043d\u0435\u043c \u043f\u043e-\u043f\u043e\u0440\u044f\u0434\u043a\u0443.<br \/>  <a name=\"habracut\"><\/a><\/p>\n<h4>\u041f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0441 in \u0438 not in \u043d\u0430 join&#8217;\u044b<\/h4>\n<p>  \u041e\u0434\u043d\u0438 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0445 \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0441 in \u0438 not in. \u041f\u0440\u0438\u0447\u0451\u043c, \u043c\u044b \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u0432 MySQL join \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043e\u0442\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0437\u0430 \u0441\u0447\u0451\u0442 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043f\u043b\u0430\u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c (\u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u0411\u0414 \u044d\u0442\u043e \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0434\u0438\u0430\u043c\u0435\u0442\u0440\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u044b\u043c), \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 join. \u041a\u0430\u043a \u043c\u044b \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c? \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u044f\u0441\u043d\u0438\u043c \u0442\u043e, \u0447\u0442\u043e in \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432\u044b\u0432\u043e\u0434\u044f\u0442 \u0432\u0441\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e \u0432 \u043e\u0431\u043e\u0438\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u0442\u0430\u043a\u043e\u043c\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0443 \u0431\u0443\u0434\u0435\u0442 \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 inner join. \u0417\u0430\u043f\u0440\u043e\u0441\u044b \u0441 not in \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442 \u0432\u044b\u0432\u043e\u0434\u044f\u0442 \u0432\u0441\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0432 \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u0435, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u0438\u043c \u0443\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 outter join. \u0418\u0442\u0430\u043a, \u043d\u0430\u0447\u0430\u043b\u043e \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043e, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441 \u044d\u0442\u0438\u043c \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c.<\/p>\n<p>  \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u043e\u0432\u0443\u044e \u0411\u0414 world, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u0441 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430 mysql <a href=\"http:\/\/dev.mysql.com\/doc\/index-other.html\">\u0437\u0434\u0435\u0441\u044c<\/a><\/p>\n<p>  \u0412 \u0411\u0414 world \u0435\u0441\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u044b Country (\u0441\u0442\u0440\u0430\u043d\u044b) \u0438 CountryLanguage (\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u044f\u0437\u044b\u043a\u0438). \u041f\u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0441\u0435\u0431\u0435 \u0437\u0430\u0434\u0430\u0447\u0443 \u043d\u0430\u0439\u0442\u0438 \u0432\u0441\u0435 \u0441\u0442\u0440\u0430\u043d\u044b, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0433\u043e\u0432\u043e\u0440\u044f\u0442 \u0445\u043e\u0442\u044f \u0431\u044b \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435. \u0413\u043e\u0432\u043e\u0440\u044f \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u043c\u044b \u0438\u0449\u0435\u043c \u0442\u0435\u0440\u0440\u0438\u0442\u043e\u0440\u0438\u0438 \u0441 \u043d\u0430\u0441\u0435\u043b\u0435\u043d\u0438\u0435\u043c, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u044f\u0437\u044b\u043a\u0438. \u041d\u0430\u043f\u0438\u0448\u0435\u043c \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0439 in \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441:<\/p>\n<pre><code class=\"sql\">SELECT * FROM Country WHERE Code IN (SELECT CountryCode FROM CountryLanguage) <\/code><\/pre>\n<p>  \u041d\u0430 \u0437\u0430\u043c\u0435\u0442\u043a\u0443, \u044d\u0442\u043e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0449\u0451 \u0438 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"sql\">SELECT * FROM Country c WHERE EXISTS (   SELECT 1 FROM CountryLanguage cl WHERE c.Code = cl.CountryCode ) <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u044b\u0448\u0435, \u043f\u0435\u0440\u0435\u043f\u0438\u0448\u0435\u043c \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 inner join:<\/p>\n<pre><code class=\"sql\">SELECT c.Name FROM Country c  INNER JOIN CountryLanguage cl ON c.Code = cl.CountryCode  +-------------+  | Name        |  +-------------+  | Aruba       |  | Aruba       |  | Aruba       |  | Aruba       |  | Afghanistan |  +-------------+  5 rows in set (0.00 sec)  <\/code><\/pre>\n<p>  \u041f\u043e\u0447\u0442\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c, \u043d\u043e \u0443 \u043d\u0430\u0441 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u0447\u0435\u0440\u0435\u0437 \u043e\u043f\u0446\u0438\u044e distinct. \u041a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043f\u043e\u043b\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0442\u0430\u043a\u0438\u043c:<\/p>\n<pre><code class=\"sql\">SELECT DISTINCT c.* FROM Country c  INNER JOIN CountryLanguage cl ON c.Code = cl.CountryCode <\/code><\/pre>\n<p>  \u041e\u0442\u043b\u0438\u0447\u043d\u043e! \u041f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441 in \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043d \u043d\u0430 join.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u2014 \u043f\u0435\u0440\u0435\u043f\u0438\u0448\u0435\u043c not in \u043d\u0430 outter join. \u0426\u0435\u043b\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u2014 \u0432\u0441\u0435 \u0442\u0435\u0440\u0440\u0438\u0442\u043e\u0440\u0438\u0438, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435 \u043f\u0440\u043e\u0436\u0438\u0432\u0430\u044e\u0442 \u043b\u044e\u0434\u0438 \u0438 \u043d\u0435\u0442 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432. \u0421\u043d\u043e\u0432\u0430 \u0432\u043d\u0430\u0447\u0430\u043b\u0435 \u043f\u0440\u0438\u0432\u043e\u0436\u0443 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 not in \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441:<\/p>\n<pre><code class=\"sql\">SELECT Name FROM Country WHERE Code NOT IN (SELECT CountryCode FROM CountryLanguage) <\/code><\/pre>\n<p>  \u0418 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e \u0435\u0433\u043e \u0436\u0435 \u0434\u043b\u044f not exists:<\/p>\n<pre><code class=\"sql\">SELECT Name FROM Country c WHERE NOT EXISTS (   SELECT 1 FROM CountryLanguage cl WHERE c.Code = cl.CountryCode ) <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0438 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043f\u0435\u0440\u0435\u043f\u0438\u0448\u0435\u043c \u043d\u0430 left join:<\/p>\n<pre><code class=\"sql\">SELECT c.* FROM Country c  LEFT JOIN CountryLanguage cl ON c.Code = cl.CountryCode <\/code><\/pre>\n<p>  \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043c, \u043a\u0430\u043a \u0438 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0438, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u0441\u0442\u0440\u043e\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043d\u0435 \u043d\u0430\u0448\u043b\u043e\u0441\u044c \u043f\u0430\u0440\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435. \u0418\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u0438 \u0441\u0442\u0440\u043e\u043a\u0438 \u0434\u0430\u044e\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u0441\u0435 \u043f\u0430\u0440\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438:<\/p>\n<pre><code class=\"sql\">SELECT c.* FROM Country c  LEFT JOIN CountryLanguage cl ON c.Code = cl.CountryCode WHERE cl.CountryCode IS NULL <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0438\u043c\u0438 \u043d\u0435 \u0445\u0438\u0442\u0440\u044b\u043c\u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f\u043c\u0438 \u043c\u044b \u0441\u043c\u043e\u0433\u043b\u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u043c\u043e\u0447\u044c \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<h4>\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u043a \u0432 \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445<\/h4>\n<p>  \u0411\u044b\u0432\u0430\u044e\u0442 \u0440\u0435\u0434\u043a\u0438\u0435 \u0441\u043b\u0443\u0447\u0430\u0438, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043d\u0435 \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443, \u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u043c, \u043e\u0434\u043d\u0430\u043a\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0430\u043a \u0431\u044b\u043b\u043e \u0431\u044b \u044f\u0432\u043d\u043e \u041d\u0415\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e:<\/p>\n<pre><code class=\"sql\">SELECT c.Name FROM City c WHERE c.ID = (SELECT Capital FROM Country WHERE Name='Finland')  AND c.CountryCode = (SELECT Code FROM Country WHERE Name='Finland') <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u044d\u0442\u0438\u0445 \u0446\u0435\u043b\u0435\u0439 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0440\u0435\u0433\u043b\u0430\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 SQL \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441, \u043e\u0442\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u044b\u0439 \u0432\u0441\u0435\u043c\u0438 \u0431\u0430\u0437\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<pre><code class=\"sql\">SELECT c.Name FROM City c WHERE (c.ID, c.CountryCode) =  (SELECT Capital, Code   FROM Country   WHERE Name='Finland') <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u043e\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u00ab\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u043e\u043c \u0441\u0442\u0440\u043e\u043a\u00bb \u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u0434\u0447\u0451\u0440\u043a\u043d\u0443\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 ROW(). \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u0431\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438:<\/p>\n<pre><code class=\"sql\">SELECT c.Name FROM City c WHERE ROW(c.ID, c.CountryCode) =  (SELECT Capital, Code   FROM Country   WHERE Name='Finland') <\/code><\/pre>\n<p>  \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0441\u0432\u043e\u044e \u043f\u0440\u0438\u0432\u043b\u0435\u043a\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0441\u0442\u0440\u043e\u043a \u0438\u043c\u0435\u0435\u0442 \u0440\u044f\u0434 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439:<br \/>  1. \u041f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043e\u0434\u043d\u0443 \u0441\u0442\u0440\u043e\u043a\u0443, \u0430 \u043d\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e<br \/>  2. \u0412\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f &lt;, &gt; \u0438\u043b\u0438 &lt;&gt;, \u0445\u043e\u0442\u044f \u044d\u0442\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043e\u0439\u0442\u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 all, any, in \u0438\u043b\u0438 exists<\/p>\n<p>  \u0421\u0442\u043e\u0438\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0442\u0430\u043a\u0443\u044e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043d\u043e \u0438 \u0432 \u0441\u043a\u0430\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u0445:<\/p>\n<pre><code class=\"sql\">SELECT Name, Population FROM Country WHERE (Continent, Region) = ('Europe', 'Western Europe') <\/code><\/pre>\n<p>  \u041f\u0440\u0430\u0432\u0434\u0430, \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435, \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u0435\u043d \u0434\u043b\u044f \u0441\u043a\u0430\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0435\u0440\u0435\u043f\u0438\u0448\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0432\u0438\u0434\u0443:<\/p>\n<pre><code class=\"sql\">SELECT Name, Population FROM Country WHERE Continent = 'Europe' AND Region = 'Western Europe' <\/code><\/pre>\n<h4>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0442\u0430\u0431\u043b\u0438\u0446.<\/h4>\n<p>  \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043a\u043e\u0433\u043e-\u0442\u043e \u0443\u0434\u0438\u0432\u0438\u0442 \u0442\u0430\u043a\u043e\u0439 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a, \u043d\u043e \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u0438 \u043d\u0435\u0442? \u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445. \u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043f\u0440\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441:<\/p>\n<pre><code class=\"sql\">UPDATE [LOW_PRIORITY] [IGNORE] table_references     SET col_name1={expr1|DEFAULT} [, col_name2={expr2|DEFAULT}] ...     [WHERE where_condition] <\/code><\/pre>\n<p>  \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0432\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u0438\u0434\u0430:<\/p>\n<pre><code class=\"sql\">UPDATE t1, t2 SET t1.name1 = t2.name2 WHERE t1.id = t2.id; <\/code><\/pre>\n<p>  \u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u043c\u0435\u0448\u0430\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u043d\u043e\u0432\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u0440\u0430\u0437\u0443 \u0432 \u0434\u0432\u0443\u0445, \u0442\u0440\u0451\u0445 \u0438 \u0431\u043e\u043b\u0435\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445:<\/p>\n<pre><code class=\"sql\">UPDATE t1, t2 SET t1.name1 = 'name1', t2.name2 = 'name2' WHERE t1.id = t2.id; <\/code><\/pre>\n<p>  \u041f\u0440\u0430\u0432\u0434\u0430, \u043e\u043d \u0432\u0440\u044f\u0434 \u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0441\u043c\u044b\u0441\u043b, \u043d\u043e, \u0442\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u0442\u0430\u043a\u043e\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e.<\/p>\n<p>  \u0421 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0435\u0439 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0435\u0449\u0451 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0435\u0435 \u043e\u0431\u0441\u0442\u043e\u044f\u0442 \u0434\u0435\u043b\u0430. \u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0434\u0435\u043a\u043b\u0430\u0440\u0438\u0440\u0443\u0435\u0442 \u0442\u0430\u043a\u043e\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441:<\/p>\n<pre><code class=\"sql\">DELETE [LOW_PRIORITY] [QUICK] [IGNORE]     tbl_name[.*] [, tbl_name[.*]] ...     FROM table_references     [WHERE where_condition] <\/code><\/pre>\n<p>  \u041b\u0438\u0431\u043e<\/p>\n<pre><code class=\"sql\">DELETE [LOW_PRIORITY] [QUICK] [IGNORE]     FROM tbl_name[.*] [, tbl_name[.*]] ...     USING table_references     [WHERE where_condition] <\/code><\/pre>\n<p>  \u0427\u0442\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c \u0432\u0438\u0434\u0430:<\/p>\n<pre><code class=\"sql\">DELETE t1 FROM t1, t2 WHERE t1.id = t2.id; DELETE FROM t1 USING t1, t2 WHERE t1.id = t2.id; <\/code><\/pre>\n<p>  \u0412 \u044d\u0442\u0438\u0445 \u0434\u0432\u0443\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b t1, \u0430 t2 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>  \u0418 \u043a\u0430\u043a \u0432\u044b \u0443\u0436\u0435 \u0434\u043e\u0433\u0430\u0434\u0430\u043b\u0438\u0441\u044c, \u0434\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0438\u0437 \u0434\u0432\u0443\u0445 \u0442\u0430\u0431\u043b\u0438\u0446 \u0434\u0435\u043b\u0430\u0435\u043c \u0442\u0430\u043a:<\/p>\n<pre><code class=\"sql\">DELETE t1, t2 FROM t1, t2 WHERE t1.id = t2.id; DELETE FROM t1, t2 USING t1, t2 WHERE t1.id = t2.id; <\/code><\/pre>\n<h4>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e OLAP. \u041c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 WITH ROLLUP<\/h4>\n<p>  \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0442\u0435, \u043a\u0442\u043e \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043b\u0441\u044f \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u043f\u0440\u043e\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0411\u0414 \u043a\u0430\u043a Oracle \u0438\u043b\u0438 SQL Server \u043f\u0440\u0438 \u0447\u0442\u0435\u043d\u0438\u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 \u0432\u0441\u043a\u0440\u0438\u043a\u043d\u0443\u0442: \u00ab\u041d\u0443 \u043d\u0430\u0434\u043e \u0436\u0435!\u00bb, \u2014 \u043d\u043e, \u0443\u0432\u044b, \u044f \u0441\u0440\u0430\u0437\u0443 \u043e\u0441\u0442\u0443\u0436\u0443 \u0438\u0445 \u043f\u043b\u0430\u043c\u0435\u043d\u043d\u044b\u0435 \u0432\u043e\u0437\u0433\u043b\u0430\u0441\u044b. \u0421 \u0432\u0435\u0440\u0441\u0438\u0438 MySQL 4.1.1, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 with rollup, \u044d\u0442\u0430 \u0442\u0435\u043c\u0430 \u043d\u0435 \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u043b\u0430\u0441\u044c \u043d\u0438 \u043d\u0430 \u043c\u0438\u043b\u043b\u0438\u043c\u0435\u0442\u0440, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043a\u0443\u0431\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u044b \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u043c\u0438 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u043e\u0439 \u0411\u0414.<\/p>\n<p>  \u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u043d\u0435 \u0432 \u043a\u0443\u0440\u0441\u0435, \u0447\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 with rollup \u043a\u0440\u0430\u0442\u043a\u043e \u043f\u043e\u044f\u0441\u043d\u044e, \u0447\u0442\u043e \u043e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0442\u0447\u0435\u0442\u043e\u0432, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0445 \u043f\u043e\u0434\u044b\u0442\u043e\u0433\u0438 \u0438 \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0438\u0442\u043e\u0433\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445, \u0431\u0443\u0434\u0443 \u0441\u043d\u043e\u0432\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0430\u0437\u0443 world.<\/p>\n<p>  \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0443\u043c\u043c\u0430\u0440\u043d\u043e\u0435 \u0438 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0447\u0438\u0441\u043b\u043e \u043f\u0440\u043e\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0445 \u043b\u044e\u0434\u0435\u0439 \u043d\u0430 \u0432\u0441\u0435\u0445 \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0442\u0435\u0440\u0440\u0438\u0442\u043e\u0440\u0438\u044f\u0445 (\u0440\u0435\u0433\u0438\u043e\u043d\u0430\u0445), \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430 \u043a\u043e\u043d\u0442\u0438\u043d\u0435\u043d\u0442\u0430\u0445 \u0438 \u0432\u043e \u0432\u0441\u0451\u043c \u043c\u0438\u0440\u0435. \u0415\u0441\u043b\u0438 \u0440\u0435\u0448\u0430\u0442\u044c \u0432 \u043b\u043e\u0431, \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b:<\/p>\n<p>  \u0421\u0443\u043c\u043c\u0430\u0440\u043d\u043e\u0435 \u0438 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0447\u0438\u0441\u043b\u043e \u043f\u0440\u043e\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0445 \u043b\u044e\u0434\u0435\u0439 \u043d\u0430 \u0432\u0441\u0435\u0445 \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0442\u0435\u0440\u0440\u0438\u0442\u043e\u0440\u0438\u044f\u0445 (\u0440\u0435\u0433\u0438\u043e\u043d\u0430\u0445):<\/p>\n<pre><code class=\"sql\">SELECT Continent, Region, SUM(Population) AS pop, AVG(Population) AS avg_pop FROM Country GROUP BY Continent, Region <\/code><\/pre>\n<p>  \u0421\u0443\u043c\u043c\u0430\u0440\u043d\u043e\u0435 \u0438 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0447\u0438\u0441\u043b\u043e \u043f\u0440\u043e\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0445 \u043b\u044e\u0434\u0435\u0439 \u043d\u0430 \u0432\u0441\u0435\u0445 \u043a\u043e\u043d\u0442\u0438\u043d\u0435\u043d\u0442\u0430\u0445:<\/p>\n<pre><code class=\"sql\">SELECT Continent, SUM(Population) AS pop, AVG(Population) AS avg_pop FROM Country GROUP BY Continent <\/code><\/pre>\n<p>  \u0421\u0443\u043c\u043c\u0430\u0440\u043d\u043e\u0435 \u0438 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0447\u0438\u0441\u043b\u043e \u043f\u0440\u043e\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0445 \u043b\u044e\u0434\u0435\u0439 \u0432\u043e \u0432\u0441\u0451\u043c \u043c\u0438\u0440\u0435:<\/p>\n<pre><code class=\"sql\">SELECT SUM(Population) AS pop, AVG(Population) AS avg_pop FROM Country <\/code><\/pre>\n<p>  \u0412\u043c\u0435\u0441\u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432, \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u0438\u043d:<\/p>\n<pre><code class=\"sql\">SELECT Continent, Region, SUM(Population) AS pop, AVG(Population) AS avg_pop FROM Country GROUP BY Continent, Region WITH ROLLUP;  +---------------+---------------------------+------------+----------------+ | Continent     | Region                    | pop        | avg_pop        | +---------------+---------------------------+------------+----------------+ | Asia          | Eastern Asia              | 1507328000 | 188416000.0000 | | Asia          | Middle East               |  188380700 |  10465594.4444 | | Asia          | Southeast Asia            |  518541000 |  47140090.9091 | | Asia          | Southern and Central Asia | 1490776000 | 106484000.0000 | | Asia          | NULL                      | 3705025700 |  72647562.7451 | | Europe        | Baltic Countries          |    7561900 |   2520633.3333 | | Europe        | British Islands           |   63398500 |  31699250.0000 | ... | Europe        | Eastern Europe            |  307026000 |  30702600.0000 | | Europe        | Nordic Countries          |   24166400 |   3452342.8571 | | Europe        | Southern Europe           |  144674200 |   9644946.6667 | ... | Europe        | Western Europe            |  183247600 |  20360844.4444 | | Europe        | NULL                      |  730074600 |  15871186.9565 | | North America | Caribbean                 |   38140000 |   1589166.6667 | | North America | Central America           |  135221000 |  16902625.0000 | | North America | North America             |  309632000 |  61926400.0000 | | North America | NULL                      |  482993000 |  13053864.8649 | | Africa        | Central Africa            |   95652000 |  10628000.0000 | ... | Africa        | Eastern Africa            |  246999000 |  12349950.0000 | | Africa        | Northern Africa           |  173266000 |  24752285.7143 | | Africa        | Southern Africa           |   46886000 |   9377200.0000 | ... | Africa        | Western Africa            |  221672000 |  13039529.4118 | | Africa        | NULL                      |  784475000 |  13525431.0345 | | Oceania       | Australia and New Zealand |   22753100 |   4550620.0000 | ... | Oceania       | Melanesia                 |    6472000 |   1294400.0000 | | Oceania       | Micronesia                |     543000 |     77571.4286 | | Oceania       | Micronesia\/Caribbean      |          0 |         0.0000 | ... | Oceania       | Polynesia                 |     633050 |     63305.0000 | | Oceania       | NULL                      |   30401150 |   1085755.3571 | | Antarctica    | Antarctica                |          0 |         0.0000 | | Antarctica    | NULL                      |          0 |         0.0000 | | South America | South America             |  345780000 |  24698571.4286 | | South America | NULL                      |  345780000 |  24698571.4286 | | NULL          | NULL                      | 6078749450 |  25434098.1172 | +---------------+---------------------------+------------+----------------+ <\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u0442\u0440\u043e\u043a\u0430\u0445 \u0432 \u043d\u0435 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u0443\u044e\u0449\u0438\u0445 \u043a\u043e\u043b\u043e\u043d\u043a\u0430\u0445 \u0441\u0442\u043e\u0438\u0442 NULL, \u0447\u0442\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u044b\u0442\u043e\u0433\u043e\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0442\u0440\u043e\u043a\u0443<\/p>\n<pre><code class=\"sql\">| South America | NULL                      |  345780000 | 24698571.4286 | <\/code><\/pre>\n<p>  \u043d\u0443\u0436\u043d\u043e \u0447\u0438\u0442\u0430\u0442\u044c \u043a\u0430\u043a \u0432 \u042e\u0436\u043d\u043e\u0439 \u0410\u043c\u0435\u0440\u0438\u043a\u0435 \u0441\u0443\u043c\u043c\u0430\u0440\u043d\u043e\u0435 \u043d\u0430\u0441\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 345780000 \u0447\u0435\u043b\u043e\u0432\u0435\u043a, \u0430 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 24698571.4286<\/p>\n<p>  \u0410 \u0432\u043e\u0442 \u0441\u0442\u0440\u043e\u043a\u0430<\/p>\n<pre><code class=\"sql\">| NULL          | NULL                      | 6078749450 | 25434098.1172 | <\/code><\/pre>\n<p>  \u042f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0438\u0442\u043e\u0433\u043e\u043c \u043f\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044e \u043a \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u0441\u0435\u043b\u0435\u043d\u0438\u044f \u043d\u0430 \u0432\u0441\u0451\u043c \u0437\u0435\u043c\u043d\u043e\u043c \u0448\u0430\u0440\u0435.<\/p>\n<p>  \u041f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u044d\u0444\u0444\u0435\u043a\u0442 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 with rollup \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0440\u043e\u0445\u043e\u0434 \u043f\u043e \u0437\u0430\u043f\u0438\u0441\u044f\u043c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043e\u0434\u0438\u043d \u0440\u0430\u0437! \u041a\u0441\u0442\u0430\u0442\u0438, \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u0430 \u043f\u0440\u0438 \u0432\u044b\u0432\u043e\u0434\u0435 \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 (\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435). \u0415\u0441\u043b\u0438 \u0432\u0430\u0441 \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b\u0430 \u0434\u0430\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438\u043b\u0438 \u043e\u0441\u0442\u0430\u043b\u0438\u0441\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u0442\u043e \u0437\u0430 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u043f\u0440\u043e\u0448\u0443 \u0432 <a href=\"http:\/\/dev.mysql.com\/doc\/refman\/5.5\/en\/group-by-modifiers.html\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e<\/a><\/p>\n<h4>\u041e\u043f\u0446\u0438\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 &#8212;i-am-a-dummy<\/h4>\n<p>  \u00ab&#8212;i-am-a-dummy\u00bb \u0432 \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a\u0430\u043a \u2013 \u00ab\u044f \u2014 \u0431\u043e\u043b\u0432\u0430\u043d\u00bb. \u042d\u0442\u0430 \u043e\u043f\u0446\u0438\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0438\u043d\u043e\u043d\u0438\u043c\u043e\u043c \u043e\u043f\u0446\u0438\u0438 &#8212;safe-updates, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u0434\u043b\u044f \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432 \u0438 \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u0440\u044f\u0434 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0432\u0430\u0448\u0435\u0439 \u043b\u044e\u0431\u0438\u043c\u043e\u0439 \u0411\u0414 \u043d\u0435 \u0441\u0442\u0430\u043b\u043e \u043f\u043b\u043e\u0445\u043e \u043e\u0442 \u0432\u0430\u0448\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439:<br \/>  1. \u0417\u0430\u043f\u0440\u043e\u0441\u044b update \u0438 delete \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u044f where \u0438\u043b\u0438 limit<br \/>  2. select \u043e\u0434\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b (\u0431\u0435\u0437 join&#8217;\u043e\u0432 \u0438 \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432) \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0432\u044b\u0435 1000 \u0441\u0442\u0440\u043e\u043a, \u0435\u0441\u043b\u0438 \u044f\u0432\u043d\u043e \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d limit<br \/>  3. select \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0441 join \u0438\u043b\u0438 \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0432\u044b\u0435 1 000 000 \u0441\u0442\u0440\u043e\u043a<\/p>\n<p>  \u0414\u043b\u044f \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0441\u043e \u0441\u0432\u043e\u0438\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438:<\/p>\n<pre><code class=\"sql\">SET sql_safe_updates=1, sql_select_limit=1000, sql_max_join_size=1000000; <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a:<\/p>\n<pre><code class=\"sql\">SELECT @@sql_safe_updates, @@sql_select_limit, @@sql_max_join_size <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0432 \u0448\u0435\u043b\u043b\u0435<\/p>\n<pre><code class=\"bash\">mysql --safe-updates --select_limit=500 --max_join_size=10000 <\/code><\/pre>\n<h4>\u042d\u0441\u0442\u0435\u0442\u0438\u0447\u043d\u044b\u0439 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438<\/h4>\n<p>  \u0418 \u043d\u0430 \u0437\u0430\u043a\u0443\u0441\u043a\u0443. \u041f\u043e\u0441\u043b\u0435 \u0411\u0414, \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0445 \u043e\u0442 MySQL, \u043c\u0435\u043d\u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u0443\u0434\u0438\u0432\u043b\u044f\u043b\u043e, \u043f\u043e\u0447\u0435\u043c\u0443 MySQL \u0432 \u043e\u0434\u043d\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u043e\u043c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438, \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0449\u0435\u043c \u043a\u0430\u043a \u0434\u0432\u043e\u0439\u043d\u043e\u0435 \u0442\u0438\u0440\u0435, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u0441\u0435\u0431\u044f \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u0440\u043e\u0431\u0435\u043b, \u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u044e \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u0439 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0441\u0438\u043c\u0432\u043e\u043b, \u0445\u043e\u0442\u044f \u043f\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0443 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0433\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u0430 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c. \u0421\u043e\u0433\u043b\u0430\u0441\u0438\u0442\u0435\u0441\u044c, \u043a\u043e\u0433\u0434\u0430 \u043f\u0438\u0448\u0435\u0448\u044c \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u0437\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u0434\u0430, \u0443\u0436 \u043e\u0447\u0435\u043d\u044c \u0434\u043e\u043b\u0433\u043e \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0430\u043a\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432.<\/p>\n<p>  \u0427\u0442\u043e \u044f \u0438\u043c\u0435\u044e \u0432\u0432\u0438\u0434\u0443. \u0412 MySQL \u043c\u044b \u043f\u0438\u0448\u0435\u043c \u0442\u0430\u043a:<\/p>\n<pre><code class=\"sql\">-- SELECT 1 <\/code><\/pre>\n<p>  (\u0441 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u043c \u043f\u0435\u0440\u0435\u0434 SELECT), \u0430 \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0411\u0414:  <\/p>\n<pre><code class=\"sql\">--SELECT 1 <\/code><\/pre>\n<p>  (\u0431\u0435\u0437 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0433\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u0430).<\/p>\n<p>  \u0420\u0430\u0437\u0433\u0430\u0434\u043a\u0430 \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439. \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u0442\u0430\u043a\u043e\u0439 \u043d\u0435\u0431\u0440\u0435\u0436\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441<\/p>\n<pre><code class=\"sql\">UPDATE account SET credit=credit--1 <\/code><\/pre>\n<p>  \u0442\u043e \u043f\u0435\u0440\u0432\u043e\u0435 \u0442\u0438\u0440\u0435 \u0431\u0443\u0434\u0435\u0442 \u0442\u0440\u0430\u043a\u0442\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043c\u0438\u043d\u0443\u0441\u043e\u043c, \u0430 \u0432\u0442\u043e\u0440\u043e\u0435 -1, \u043d\u043e \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u043c. \u0415\u0441\u043b\u0438 \u043f\u043e\u0441\u043b\u0435 \u0434\u0432\u0443\u0445 \u0442\u0438\u0440\u0435 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0441\u0438\u043c\u0432\u043e\u043b, \u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 <a href=\"http:\/\/dev.mysql.com\/doc\/refman\/5.5\/en\/ansi-diff-comments.html\">\u0437\u0434\u0435\u0441\u044c<\/a><\/p>\n<p>  \u0412 \u0438\u0442\u043e\u0433\u0435, \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0432 \u0441\u0432\u043e\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u0435 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0445 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0441\u0438\u043c\u0432\u043e\u043b \u0440\u0435\u0448\u0451\u0442\u043a\u0438 (#), \u043d\u0435\u0436\u0435\u043b\u0438 \u0434\u0432\u043e\u0439\u043d\u043e\u0435 \u0442\u0438\u0440\u0435 \u0441 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u043c \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u043c \ud83d\ude42    \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/196692\/\"> http:\/\/habrahabr.ru\/post\/196692\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0437\u0430\u0434\u0443\u043c\u0430\u043d\u0430 \u043c\u043d\u043e\u0439 \u043a\u0430\u043a \u0441\u0431\u043e\u0440\u043d\u0438\u043a \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 SQL \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0411\u0414 MySQL, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u043f\u043b\u043e\u0445\u043e \u043e\u0441\u0432\u0435\u0449\u0435\u043d\u043d\u044b\u0445 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435. \u0422\u0430\u043a, \u0438\u0437 \u0441\u0442\u0430\u0442\u044c\u0438 \u0432\u044b \u0443\u0437\u043d\u0430\u0435\u0442\u0435 \u043e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 with rollup, \u0438 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u044b in \u0438 not in \u043d\u0430 join&#8217;\u044b, \u0430 \u0442\u0430\u043a \u0436\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445 \u2014 \u043e\u0434\u043d\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c, \u0438 \u043c\u043d\u043e\u0433\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0435. \u041d\u0430\u0447\u043d\u0435\u043c \u043f\u043e-\u043f\u043e\u0440\u044f\u0434\u043a\u0443.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-196692","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/196692","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=196692"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/196692\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=196692"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=196692"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=196692"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}