Last active
September 3, 2018 20:26
-
-
Save JerryFox/1c0cccf4c0410fe422f62589711805c5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mysql> select ECO, count(*) pocet from kingbase group by ECO; | |
| +-----+-------+ | |
| | ECO | pocet | | |
| +-----+-------+ | |
| | A80 | 7286 | | |
| | A81 | 5661 | | |
| | A82 | 238 | | |
| | A83 | 1172 | | |
| | A84 | 1828 | | |
| | A85 | 3170 | | |
| | A86 | 1634 | | |
| | A87 | 4424 | | |
| | A88 | 2611 | | |
| | A89 | 1675 | | |
| | A90 | 5754 | | |
| | A91 | 428 | | |
| | A92 | 583 | | |
| | A93 | 253 | | |
| | A94 | 286 | | |
| | A95 | 255 | | |
| | A96 | 1426 | | |
| | A97 | 280 | | |
| | A98 | 133 | | |
| | A99 | 350 | | |
| +-----+-------+ | |
| 20 rows in set (0,28 sec) | |
| mysql> select * from (select ECO, count(*) pocet from kingbase group by ECO) as pocty where pocet=(select min(pocet) from (select count(*) pocet from kingbase group by ECO) as poc1); | |
| +-----+-------+ | |
| | ECO | pocet | | |
| +-----+-------+ | |
| | A98 | 133 | | |
| +-----+-------+ | |
| 1 row in set (0,29 sec) | |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Chci vypsat ECO s nejnižším počtem záznamů. Dá se ten druhý dotaz napsat nějak inteligentněji?