You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2159 lines
56 KiB

Improved testing of ssl and compression - Added show status variable "compression" for checking that compression is turned on. - Updated show status variable "have_openssl" to be set to DISABLED if server supports ssl but it's not turned on to accept incoming ssl connections. - Setup server to accept ssl connections from clients ig that is supported by server - New tests - ssl - Run with ssl turned on - ssl_compress - Run with ssl and compression turned on - compress - Run with compression turned in - Updated test - openssl_1, rpl_openssl1 - Changed to run if server supports ssl BitKeeper/deleted/.del-have_openssl_1.inc~55590efedeec9ee0: Delete: mysql-test/include/have_openssl_1.inc BitKeeper/deleted/.del-have_openssl_1.require~e8cdeb0adba99ac5: Delete: mysql-test/r/have_openssl_1.require client/mysqltest.c: Add commands to enable/disable ssl for the follwing connect's Add commands to enable/disable compression for the following connect's mysql-test/mysql-test-run.pl: Test if ssl is supported by the server If ssl is supported by the server, start server with ability to accept ssl connections from clients Cleanup check of supported features check_ssl_support, check_ndbcluster_support Flags and helptext for mysl-test-run.pl updated --ssl, turn on ssl encryption between server and client --skip-ssl, don'r turn on ssl or setup ssl even if it's supported --with-openssl, deprecated, synonym with --ssl mysql-test/r/openssl_1.result: Update test results mysql-test/t/openssl_1.test: Run this if server reports it has support for ssl Enable ssl before connecting Check that ssl encryption has been turned on mysql-test/t/rpl_openssl.test: Run this if server reports it supports ssl sql-common/client.c: Add DBUG_PRINT's sql/mysqld.cc: If server can't accept ssl connection set have_openssl to SHOW_OPTION_DISABLED Add status variable to show if connection with server is using compressed protocol sql/sql_show.cc: Add status variable to show if connection with server is using compressed protocol sql/structs.h: Add status variable to show if connection with server is using compressed protocol mysql-test/r/compress.result: New BitKeeper file ``mysql-test/r/compress.result'' mysql-test/r/ssl.result: New BitKeeper file ``mysql-test/r/ssl.result'' mysql-test/r/ssl_compress.result: New BitKeeper file ``mysql-test/r/ssl_compress.result'' mysql-test/t/compress.test: New BitKeeper file ``mysql-test/t/compress.test'' mysql-test/t/ssl.test: New BitKeeper file ``mysql-test/t/ssl.test'' mysql-test/t/ssl_compress.test: New BitKeeper file ``mysql-test/t/ssl_compress.test''
21 years ago
20 years ago
Improved testing of ssl and compression - Added show status variable "compression" for checking that compression is turned on. - Updated show status variable "have_openssl" to be set to DISABLED if server supports ssl but it's not turned on to accept incoming ssl connections. - Setup server to accept ssl connections from clients ig that is supported by server - New tests - ssl - Run with ssl turned on - ssl_compress - Run with ssl and compression turned on - compress - Run with compression turned in - Updated test - openssl_1, rpl_openssl1 - Changed to run if server supports ssl BitKeeper/deleted/.del-have_openssl_1.inc~55590efedeec9ee0: Delete: mysql-test/include/have_openssl_1.inc BitKeeper/deleted/.del-have_openssl_1.require~e8cdeb0adba99ac5: Delete: mysql-test/r/have_openssl_1.require client/mysqltest.c: Add commands to enable/disable ssl for the follwing connect's Add commands to enable/disable compression for the following connect's mysql-test/mysql-test-run.pl: Test if ssl is supported by the server If ssl is supported by the server, start server with ability to accept ssl connections from clients Cleanup check of supported features check_ssl_support, check_ndbcluster_support Flags and helptext for mysl-test-run.pl updated --ssl, turn on ssl encryption between server and client --skip-ssl, don'r turn on ssl or setup ssl even if it's supported --with-openssl, deprecated, synonym with --ssl mysql-test/r/openssl_1.result: Update test results mysql-test/t/openssl_1.test: Run this if server reports it has support for ssl Enable ssl before connecting Check that ssl encryption has been turned on mysql-test/t/rpl_openssl.test: Run this if server reports it supports ssl sql-common/client.c: Add DBUG_PRINT's sql/mysqld.cc: If server can't accept ssl connection set have_openssl to SHOW_OPTION_DISABLED Add status variable to show if connection with server is using compressed protocol sql/sql_show.cc: Add status variable to show if connection with server is using compressed protocol sql/structs.h: Add status variable to show if connection with server is using compressed protocol mysql-test/r/compress.result: New BitKeeper file ``mysql-test/r/compress.result'' mysql-test/r/ssl.result: New BitKeeper file ``mysql-test/r/ssl.result'' mysql-test/r/ssl_compress.result: New BitKeeper file ``mysql-test/r/ssl_compress.result'' mysql-test/t/compress.test: New BitKeeper file ``mysql-test/t/compress.test'' mysql-test/t/ssl.test: New BitKeeper file ``mysql-test/t/ssl.test'' mysql-test/t/ssl_compress.test: New BitKeeper file ``mysql-test/t/ssl_compress.test''
21 years ago
20 years ago
Improved testing of ssl and compression - Added show status variable "compression" for checking that compression is turned on. - Updated show status variable "have_openssl" to be set to DISABLED if server supports ssl but it's not turned on to accept incoming ssl connections. - Setup server to accept ssl connections from clients ig that is supported by server - New tests - ssl - Run with ssl turned on - ssl_compress - Run with ssl and compression turned on - compress - Run with compression turned in - Updated test - openssl_1, rpl_openssl1 - Changed to run if server supports ssl BitKeeper/deleted/.del-have_openssl_1.inc~55590efedeec9ee0: Delete: mysql-test/include/have_openssl_1.inc BitKeeper/deleted/.del-have_openssl_1.require~e8cdeb0adba99ac5: Delete: mysql-test/r/have_openssl_1.require client/mysqltest.c: Add commands to enable/disable ssl for the follwing connect's Add commands to enable/disable compression for the following connect's mysql-test/mysql-test-run.pl: Test if ssl is supported by the server If ssl is supported by the server, start server with ability to accept ssl connections from clients Cleanup check of supported features check_ssl_support, check_ndbcluster_support Flags and helptext for mysl-test-run.pl updated --ssl, turn on ssl encryption between server and client --skip-ssl, don'r turn on ssl or setup ssl even if it's supported --with-openssl, deprecated, synonym with --ssl mysql-test/r/openssl_1.result: Update test results mysql-test/t/openssl_1.test: Run this if server reports it has support for ssl Enable ssl before connecting Check that ssl encryption has been turned on mysql-test/t/rpl_openssl.test: Run this if server reports it supports ssl sql-common/client.c: Add DBUG_PRINT's sql/mysqld.cc: If server can't accept ssl connection set have_openssl to SHOW_OPTION_DISABLED Add status variable to show if connection with server is using compressed protocol sql/sql_show.cc: Add status variable to show if connection with server is using compressed protocol sql/structs.h: Add status variable to show if connection with server is using compressed protocol mysql-test/r/compress.result: New BitKeeper file ``mysql-test/r/compress.result'' mysql-test/r/ssl.result: New BitKeeper file ``mysql-test/r/ssl.result'' mysql-test/r/ssl_compress.result: New BitKeeper file ``mysql-test/r/ssl_compress.result'' mysql-test/t/compress.test: New BitKeeper file ``mysql-test/t/compress.test'' mysql-test/t/ssl.test: New BitKeeper file ``mysql-test/t/ssl.test'' mysql-test/t/ssl_compress.test: New BitKeeper file ``mysql-test/t/ssl_compress.test''
21 years ago
Improved testing of ssl and compression - Added show status variable "compression" for checking that compression is turned on. - Updated show status variable "have_openssl" to be set to DISABLED if server supports ssl but it's not turned on to accept incoming ssl connections. - Setup server to accept ssl connections from clients ig that is supported by server - New tests - ssl - Run with ssl turned on - ssl_compress - Run with ssl and compression turned on - compress - Run with compression turned in - Updated test - openssl_1, rpl_openssl1 - Changed to run if server supports ssl BitKeeper/deleted/.del-have_openssl_1.inc~55590efedeec9ee0: Delete: mysql-test/include/have_openssl_1.inc BitKeeper/deleted/.del-have_openssl_1.require~e8cdeb0adba99ac5: Delete: mysql-test/r/have_openssl_1.require client/mysqltest.c: Add commands to enable/disable ssl for the follwing connect's Add commands to enable/disable compression for the following connect's mysql-test/mysql-test-run.pl: Test if ssl is supported by the server If ssl is supported by the server, start server with ability to accept ssl connections from clients Cleanup check of supported features check_ssl_support, check_ndbcluster_support Flags and helptext for mysl-test-run.pl updated --ssl, turn on ssl encryption between server and client --skip-ssl, don'r turn on ssl or setup ssl even if it's supported --with-openssl, deprecated, synonym with --ssl mysql-test/r/openssl_1.result: Update test results mysql-test/t/openssl_1.test: Run this if server reports it has support for ssl Enable ssl before connecting Check that ssl encryption has been turned on mysql-test/t/rpl_openssl.test: Run this if server reports it supports ssl sql-common/client.c: Add DBUG_PRINT's sql/mysqld.cc: If server can't accept ssl connection set have_openssl to SHOW_OPTION_DISABLED Add status variable to show if connection with server is using compressed protocol sql/sql_show.cc: Add status variable to show if connection with server is using compressed protocol sql/structs.h: Add status variable to show if connection with server is using compressed protocol mysql-test/r/compress.result: New BitKeeper file ``mysql-test/r/compress.result'' mysql-test/r/ssl.result: New BitKeeper file ``mysql-test/r/ssl.result'' mysql-test/r/ssl_compress.result: New BitKeeper file ``mysql-test/r/ssl_compress.result'' mysql-test/t/compress.test: New BitKeeper file ``mysql-test/t/compress.test'' mysql-test/t/ssl.test: New BitKeeper file ``mysql-test/t/ssl.test'' mysql-test/t/ssl_compress.test: New BitKeeper file ``mysql-test/t/ssl_compress.test''
21 years ago
Improved testing of ssl and compression - Added show status variable "compression" for checking that compression is turned on. - Updated show status variable "have_openssl" to be set to DISABLED if server supports ssl but it's not turned on to accept incoming ssl connections. - Setup server to accept ssl connections from clients ig that is supported by server - New tests - ssl - Run with ssl turned on - ssl_compress - Run with ssl and compression turned on - compress - Run with compression turned in - Updated test - openssl_1, rpl_openssl1 - Changed to run if server supports ssl BitKeeper/deleted/.del-have_openssl_1.inc~55590efedeec9ee0: Delete: mysql-test/include/have_openssl_1.inc BitKeeper/deleted/.del-have_openssl_1.require~e8cdeb0adba99ac5: Delete: mysql-test/r/have_openssl_1.require client/mysqltest.c: Add commands to enable/disable ssl for the follwing connect's Add commands to enable/disable compression for the following connect's mysql-test/mysql-test-run.pl: Test if ssl is supported by the server If ssl is supported by the server, start server with ability to accept ssl connections from clients Cleanup check of supported features check_ssl_support, check_ndbcluster_support Flags and helptext for mysl-test-run.pl updated --ssl, turn on ssl encryption between server and client --skip-ssl, don'r turn on ssl or setup ssl even if it's supported --with-openssl, deprecated, synonym with --ssl mysql-test/r/openssl_1.result: Update test results mysql-test/t/openssl_1.test: Run this if server reports it has support for ssl Enable ssl before connecting Check that ssl encryption has been turned on mysql-test/t/rpl_openssl.test: Run this if server reports it supports ssl sql-common/client.c: Add DBUG_PRINT's sql/mysqld.cc: If server can't accept ssl connection set have_openssl to SHOW_OPTION_DISABLED Add status variable to show if connection with server is using compressed protocol sql/sql_show.cc: Add status variable to show if connection with server is using compressed protocol sql/structs.h: Add status variable to show if connection with server is using compressed protocol mysql-test/r/compress.result: New BitKeeper file ``mysql-test/r/compress.result'' mysql-test/r/ssl.result: New BitKeeper file ``mysql-test/r/ssl.result'' mysql-test/r/ssl_compress.result: New BitKeeper file ``mysql-test/r/ssl_compress.result'' mysql-test/t/compress.test: New BitKeeper file ``mysql-test/t/compress.test'' mysql-test/t/ssl.test: New BitKeeper file ``mysql-test/t/ssl.test'' mysql-test/t/ssl_compress.test: New BitKeeper file ``mysql-test/t/ssl_compress.test''
21 years ago
Improved testing of ssl and compression - Added show status variable "compression" for checking that compression is turned on. - Updated show status variable "have_openssl" to be set to DISABLED if server supports ssl but it's not turned on to accept incoming ssl connections. - Setup server to accept ssl connections from clients ig that is supported by server - New tests - ssl - Run with ssl turned on - ssl_compress - Run with ssl and compression turned on - compress - Run with compression turned in - Updated test - openssl_1, rpl_openssl1 - Changed to run if server supports ssl BitKeeper/deleted/.del-have_openssl_1.inc~55590efedeec9ee0: Delete: mysql-test/include/have_openssl_1.inc BitKeeper/deleted/.del-have_openssl_1.require~e8cdeb0adba99ac5: Delete: mysql-test/r/have_openssl_1.require client/mysqltest.c: Add commands to enable/disable ssl for the follwing connect's Add commands to enable/disable compression for the following connect's mysql-test/mysql-test-run.pl: Test if ssl is supported by the server If ssl is supported by the server, start server with ability to accept ssl connections from clients Cleanup check of supported features check_ssl_support, check_ndbcluster_support Flags and helptext for mysl-test-run.pl updated --ssl, turn on ssl encryption between server and client --skip-ssl, don'r turn on ssl or setup ssl even if it's supported --with-openssl, deprecated, synonym with --ssl mysql-test/r/openssl_1.result: Update test results mysql-test/t/openssl_1.test: Run this if server reports it has support for ssl Enable ssl before connecting Check that ssl encryption has been turned on mysql-test/t/rpl_openssl.test: Run this if server reports it supports ssl sql-common/client.c: Add DBUG_PRINT's sql/mysqld.cc: If server can't accept ssl connection set have_openssl to SHOW_OPTION_DISABLED Add status variable to show if connection with server is using compressed protocol sql/sql_show.cc: Add status variable to show if connection with server is using compressed protocol sql/structs.h: Add status variable to show if connection with server is using compressed protocol mysql-test/r/compress.result: New BitKeeper file ``mysql-test/r/compress.result'' mysql-test/r/ssl.result: New BitKeeper file ``mysql-test/r/ssl.result'' mysql-test/r/ssl_compress.result: New BitKeeper file ``mysql-test/r/ssl_compress.result'' mysql-test/t/compress.test: New BitKeeper file ``mysql-test/t/compress.test'' mysql-test/t/ssl.test: New BitKeeper file ``mysql-test/t/ssl.test'' mysql-test/t/ssl_compress.test: New BitKeeper file ``mysql-test/t/ssl_compress.test''
21 years ago
  1. SHOW STATUS LIKE 'Ssl_cipher';
  2. Variable_name Value
  3. Ssl_cipher DHE-RSA-AES256-SHA
  4. drop table if exists t1,t2,t3,t4;
  5. CREATE TABLE t1 (
  6. Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
  7. Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL
  8. );
  9. INSERT INTO t1 VALUES (9410,9412);
  10. select period from t1;
  11. period
  12. 9410
  13. select * from t1;
  14. Period Varor_period
  15. 9410 9412
  16. select t1.* from t1;
  17. Period Varor_period
  18. 9410 9412
  19. CREATE TABLE t2 (
  20. auto int not null auto_increment,
  21. fld1 int(6) unsigned zerofill DEFAULT '000000' NOT NULL,
  22. companynr tinyint(2) unsigned zerofill DEFAULT '00' NOT NULL,
  23. fld3 char(30) DEFAULT '' NOT NULL,
  24. fld4 char(35) DEFAULT '' NOT NULL,
  25. fld5 char(35) DEFAULT '' NOT NULL,
  26. fld6 char(4) DEFAULT '' NOT NULL,
  27. UNIQUE fld1 (fld1),
  28. KEY fld3 (fld3),
  29. PRIMARY KEY (auto)
  30. );
  31. select t2.fld3 from t2 where companynr = 58 and fld3 like "%imaginable%";
  32. fld3
  33. imaginable
  34. select fld3 from t2 where fld3 like "%cultivation" ;
  35. fld3
  36. cultivation
  37. select t2.fld3,companynr from t2 where companynr = 57+1 order by fld3;
  38. fld3 companynr
  39. concoct 58
  40. druggists 58
  41. engrossing 58
  42. Eurydice 58
  43. exclaimers 58
  44. ferociousness 58
  45. hopelessness 58
  46. Huey 58
  47. imaginable 58
  48. judges 58
  49. merging 58
  50. ostrich 58
  51. peering 58
  52. Phelps 58
  53. presumes 58
  54. Ruth 58
  55. sentences 58
  56. Shylock 58
  57. straggled 58
  58. synergy 58
  59. thanking 58
  60. tying 58
  61. unlocks 58
  62. select fld3,companynr from t2 where companynr = 58 order by fld3;
  63. fld3 companynr
  64. concoct 58
  65. druggists 58
  66. engrossing 58
  67. Eurydice 58
  68. exclaimers 58
  69. ferociousness 58
  70. hopelessness 58
  71. Huey 58
  72. imaginable 58
  73. judges 58
  74. merging 58
  75. ostrich 58
  76. peering 58
  77. Phelps 58
  78. presumes 58
  79. Ruth 58
  80. sentences 58
  81. Shylock 58
  82. straggled 58
  83. synergy 58
  84. thanking 58
  85. tying 58
  86. unlocks 58
  87. select fld3 from t2 order by fld3 desc limit 10;
  88. fld3
  89. youthfulness
  90. yelped
  91. Wotan
  92. workers
  93. Witt
  94. witchcraft
  95. Winsett
  96. Willy
  97. willed
  98. wildcats
  99. select fld3 from t2 order by fld3 desc limit 5;
  100. fld3
  101. youthfulness
  102. yelped
  103. Wotan
  104. workers
  105. Witt
  106. select fld3 from t2 order by fld3 desc limit 5,5;
  107. fld3
  108. witchcraft
  109. Winsett
  110. Willy
  111. willed
  112. wildcats
  113. select t2.fld3 from t2 where fld3 = 'honeysuckle';
  114. fld3
  115. honeysuckle
  116. select t2.fld3 from t2 where fld3 LIKE 'honeysuckl_';
  117. fld3
  118. honeysuckle
  119. select t2.fld3 from t2 where fld3 LIKE 'hon_ysuckl_';
  120. fld3
  121. honeysuckle
  122. select t2.fld3 from t2 where fld3 LIKE 'honeysuckle%';
  123. fld3
  124. honeysuckle
  125. select t2.fld3 from t2 where fld3 LIKE 'h%le';
  126. fld3
  127. honeysuckle
  128. select t2.fld3 from t2 where fld3 LIKE 'honeysuckle_';
  129. fld3
  130. select t2.fld3 from t2 where fld3 LIKE 'don_t_find_me_please%';
  131. fld3
  132. explain select t2.fld3 from t2 where fld3 = 'honeysuckle';
  133. id select_type table type possible_keys key key_len ref rows Extra
  134. 1 SIMPLE t2 ref fld3 fld3 30 const 1 Using where; Using index
  135. explain select fld3 from t2 ignore index (fld3) where fld3 = 'honeysuckle';
  136. id select_type table type possible_keys key key_len ref rows Extra
  137. 1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
  138. explain select fld3 from t2 use index (fld1) where fld3 = 'honeysuckle';
  139. id select_type table type possible_keys key key_len ref rows Extra
  140. 1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
  141. explain select fld3 from t2 use index (fld3) where fld3 = 'honeysuckle';
  142. id select_type table type possible_keys key key_len ref rows Extra
  143. 1 SIMPLE t2 ref fld3 fld3 30 const 1 Using where; Using index
  144. explain select fld3 from t2 use index (fld1,fld3) where fld3 = 'honeysuckle';
  145. id select_type table type possible_keys key key_len ref rows Extra
  146. 1 SIMPLE t2 ref fld3 fld3 30 const 1 Using where; Using index
  147. explain select fld3 from t2 ignore index (fld3,not_used);
  148. ERROR HY000: Key 'not_used' doesn't exist in table 't2'
  149. explain select fld3 from t2 use index (not_used);
  150. ERROR HY000: Key 'not_used' doesn't exist in table 't2'
  151. select t2.fld3 from t2 where fld3 >= 'honeysuckle' and fld3 <= 'honoring' order by fld3;
  152. fld3
  153. honeysuckle
  154. honoring
  155. explain select t2.fld3 from t2 where fld3 >= 'honeysuckle' and fld3 <= 'honoring' order by fld3;
  156. id select_type table type possible_keys key key_len ref rows Extra
  157. 1 SIMPLE t2 range fld3 fld3 30 NULL 2 Using where; Using index
  158. select fld1,fld3 from t2 where fld3="Colombo" or fld3 = "nondecreasing" order by fld3;
  159. fld1 fld3
  160. 148504 Colombo
  161. 068305 Colombo
  162. 000000 nondecreasing
  163. select fld1,fld3 from t2 where companynr = 37 and fld3 = 'appendixes';
  164. fld1 fld3
  165. 232605 appendixes
  166. 1232605 appendixes
  167. 1232606 appendixes
  168. 1232607 appendixes
  169. 1232608 appendixes
  170. 1232609 appendixes
  171. select fld1 from t2 where fld1=250501 or fld1="250502";
  172. fld1
  173. 250501
  174. 250502
  175. explain select fld1 from t2 where fld1=250501 or fld1="250502";
  176. id select_type table type possible_keys key key_len ref rows Extra
  177. 1 SIMPLE t2 range fld1 fld1 4 NULL 2 Using where; Using index
  178. select fld1 from t2 where fld1=250501 or fld1=250502 or fld1 >= 250505 and fld1 <= 250601 or fld1 between 250501 and 250502;
  179. fld1
  180. 250501
  181. 250502
  182. 250505
  183. 250601
  184. explain select fld1 from t2 where fld1=250501 or fld1=250502 or fld1 >= 250505 and fld1 <= 250601 or fld1 between 250501 and 250502;
  185. id select_type table type possible_keys key key_len ref rows Extra
  186. 1 SIMPLE t2 range fld1 fld1 4 NULL 4 Using where; Using index
  187. select fld1,fld3 from t2 where companynr = 37 and fld3 like 'f%';
  188. fld1 fld3
  189. 218401 faithful
  190. 018007 fanatic
  191. 228311 fated
  192. 018017 featherweight
  193. 218022 feed
  194. 088303 feminine
  195. 058004 Fenton
  196. 038017 fetched
  197. 018054 fetters
  198. 208101 fiftieth
  199. 238007 filial
  200. 013606 fingerings
  201. 218008 finishers
  202. 038205 firearm
  203. 188505 fitting
  204. 202301 Fitzpatrick
  205. 238008 fixedly
  206. 012001 flanking
  207. 018103 flint
  208. 018104 flopping
  209. 188007 flurried
  210. 013602 foldout
  211. 226205 foothill
  212. 232102 forgivably
  213. 228306 forthcoming
  214. 186002 freakish
  215. 208113 freest
  216. 231315 freezes
  217. 036002 funereal
  218. 226209 furnishings
  219. 198006 furthermore
  220. select fld3 from t2 where fld3 like "L%" and fld3 = "ok";
  221. fld3
  222. select fld3 from t2 where (fld3 like "C%" and fld3 = "Chantilly");
  223. fld3
  224. Chantilly
  225. select fld1,fld3 from t2 where fld1 like "25050%";
  226. fld1 fld3
  227. 250501 poisoning
  228. 250502 Iraqis
  229. 250503 heaving
  230. 250504 population
  231. 250505 bomb
  232. select fld1,fld3 from t2 where fld1 like "25050_";
  233. fld1 fld3
  234. 250501 poisoning
  235. 250502 Iraqis
  236. 250503 heaving
  237. 250504 population
  238. 250505 bomb
  239. select distinct companynr from t2;
  240. companynr
  241. 00
  242. 37
  243. 36
  244. 50
  245. 58
  246. 29
  247. 40
  248. 53
  249. 65
  250. 41
  251. 34
  252. 68
  253. select distinct companynr from t2 order by companynr;
  254. companynr
  255. 00
  256. 29
  257. 34
  258. 36
  259. 37
  260. 40
  261. 41
  262. 50
  263. 53
  264. 58
  265. 65
  266. 68
  267. select distinct companynr from t2 order by companynr desc;
  268. companynr
  269. 68
  270. 65
  271. 58
  272. 53
  273. 50
  274. 41
  275. 40
  276. 37
  277. 36
  278. 34
  279. 29
  280. 00
  281. select distinct t2.fld3,period from t2,t1 where companynr=37 and fld3 like "O%";
  282. fld3 period
  283. obliterates 9410
  284. offload 9410
  285. opaquely 9410
  286. organizer 9410
  287. overestimating 9410
  288. overlay 9410
  289. select distinct fld3 from t2 where companynr = 34 order by fld3;
  290. fld3
  291. absentee
  292. accessed
  293. ahead
  294. alphabetic
  295. Asiaticizations
  296. attitude
  297. aye
  298. bankruptcies
  299. belays
  300. Blythe
  301. bomb
  302. boulevard
  303. bulldozes
  304. cannot
  305. caressing
  306. charcoal
  307. checksumming
  308. chess
  309. clubroom
  310. colorful
  311. cosy
  312. creator
  313. crying
  314. Darius
  315. diffusing
  316. duality
  317. Eiffel
  318. Epiphany
  319. Ernestine
  320. explorers
  321. exterminated
  322. famine
  323. forked
  324. Gershwins
  325. heaving
  326. Hodges
  327. Iraqis
  328. Italianization
  329. Lagos
  330. landslide
  331. libretto
  332. Majorca
  333. mastering
  334. narrowed
  335. occurred
  336. offerers
  337. Palestine
  338. Peruvianizes
  339. pharmaceutic
  340. poisoning
  341. population
  342. Pygmalion
  343. rats
  344. realest
  345. recording
  346. regimented
  347. retransmitting
  348. reviver
  349. rouses
  350. scars
  351. sicker
  352. sleepwalk
  353. stopped
  354. sugars
  355. translatable
  356. uncles
  357. unexpected
  358. uprisings
  359. versatility
  360. vest
  361. select distinct fld3 from t2 limit 10;
  362. fld3
  363. abates
  364. abiding
  365. Abraham
  366. abrogating
  367. absentee
  368. abut
  369. accessed
  370. accruing
  371. accumulating
  372. accuracies
  373. select distinct fld3 from t2 having fld3 like "A%" limit 10;
  374. fld3
  375. abates
  376. abiding
  377. Abraham
  378. abrogating
  379. absentee
  380. abut
  381. accessed
  382. accruing
  383. accumulating
  384. accuracies
  385. select distinct substring(fld3,1,3) from t2 where fld3 like "A%";
  386. substring(fld3,1,3)
  387. aba
  388. abi
  389. Abr
  390. abs
  391. abu
  392. acc
  393. acq
  394. acu
  395. Ade
  396. adj
  397. Adl
  398. adm
  399. Ado
  400. ads
  401. adv
  402. aer
  403. aff
  404. afi
  405. afl
  406. afo
  407. agi
  408. ahe
  409. aim
  410. air
  411. Ald
  412. alg
  413. ali
  414. all
  415. alp
  416. alr
  417. ama
  418. ame
  419. amm
  420. ana
  421. and
  422. ane
  423. Ang
  424. ani
  425. Ann
  426. Ant
  427. api
  428. app
  429. aqu
  430. Ara
  431. arc
  432. Arm
  433. arr
  434. Art
  435. Asi
  436. ask
  437. asp
  438. ass
  439. ast
  440. att
  441. aud
  442. Aug
  443. aut
  444. ave
  445. avo
  446. awe
  447. aye
  448. Azt
  449. select distinct substring(fld3,1,3) as a from t2 having a like "A%" order by a limit 10;
  450. a
  451. aba
  452. abi
  453. Abr
  454. abs
  455. abu
  456. acc
  457. acq
  458. acu
  459. Ade
  460. adj
  461. select distinct substring(fld3,1,3) from t2 where fld3 like "A%" limit 10;
  462. substring(fld3,1,3)
  463. aba
  464. abi
  465. Abr
  466. abs
  467. abu
  468. acc
  469. acq
  470. acu
  471. Ade
  472. adj
  473. select distinct substring(fld3,1,3) as a from t2 having a like "A%" limit 10;
  474. a
  475. aba
  476. abi
  477. Abr
  478. abs
  479. abu
  480. acc
  481. acq
  482. acu
  483. Ade
  484. adj
  485. create table t3 (
  486. period int not null,
  487. name char(32) not null,
  488. companynr int not null,
  489. price double(11,0),
  490. price2 double(11,0),
  491. key (period),
  492. key (name)
  493. );
  494. create temporary table tmp engine = myisam select * from t3;
  495. insert into t3 select * from tmp;
  496. insert into tmp select * from t3;
  497. insert into t3 select * from tmp;
  498. insert into tmp select * from t3;
  499. insert into t3 select * from tmp;
  500. insert into tmp select * from t3;
  501. insert into t3 select * from tmp;
  502. insert into tmp select * from t3;
  503. insert into t3 select * from tmp;
  504. insert into tmp select * from t3;
  505. insert into t3 select * from tmp;
  506. insert into tmp select * from t3;
  507. insert into t3 select * from tmp;
  508. insert into tmp select * from t3;
  509. insert into t3 select * from tmp;
  510. insert into tmp select * from t3;
  511. insert into t3 select * from tmp;
  512. alter table t3 add t2nr int not null auto_increment primary key first;
  513. drop table tmp;
  514. SET SQL_BIG_TABLES=1;
  515. select distinct concat(fld3," ",fld3) as namn from t2,t3 where t2.fld1=t3.t2nr order by namn limit 10;
  516. namn
  517. Abraham Abraham
  518. abrogating abrogating
  519. admonishing admonishing
  520. Adolph Adolph
  521. afield afield
  522. aging aging
  523. ammonium ammonium
  524. analyzable analyzable
  525. animals animals
  526. animized animized
  527. SET SQL_BIG_TABLES=0;
  528. select distinct concat(fld3," ",fld3) from t2,t3 where t2.fld1=t3.t2nr order by fld3 limit 10;
  529. concat(fld3," ",fld3)
  530. Abraham Abraham
  531. abrogating abrogating
  532. admonishing admonishing
  533. Adolph Adolph
  534. afield afield
  535. aging aging
  536. ammonium ammonium
  537. analyzable analyzable
  538. animals animals
  539. animized animized
  540. select distinct fld5 from t2 limit 10;
  541. fld5
  542. neat
  543. Steinberg
  544. jarring
  545. tinily
  546. balled
  547. persist
  548. attainments
  549. fanatic
  550. measures
  551. rightfulness
  552. select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10;
  553. fld3 count(*)
  554. affixed 1
  555. and 1
  556. annoyers 1
  557. Anthony 1
  558. assayed 1
  559. assurers 1
  560. attendants 1
  561. bedlam 1
  562. bedpost 1
  563. boasted 1
  564. SET SQL_BIG_TABLES=1;
  565. select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10;
  566. fld3 count(*)
  567. affixed 1
  568. and 1
  569. annoyers 1
  570. Anthony 1
  571. assayed 1
  572. assurers 1
  573. attendants 1
  574. bedlam 1
  575. bedpost 1
  576. boasted 1
  577. SET SQL_BIG_TABLES=0;
  578. select distinct fld3,repeat("a",length(fld3)),count(*) from t2 group by companynr,fld3 limit 100,10;
  579. fld3 repeat("a",length(fld3)) count(*)
  580. circus aaaaaa 1
  581. cited aaaaa 1
  582. Colombo aaaaaaa 1
  583. congresswoman aaaaaaaaaaaaa 1
  584. contrition aaaaaaaaaa 1
  585. corny aaaaa 1
  586. cultivation aaaaaaaaaaa 1
  587. definiteness aaaaaaaaaaaa 1
  588. demultiplex aaaaaaaaaaa 1
  589. disappointing aaaaaaaaaaaaa 1
  590. select distinct companynr,rtrim(space(512+companynr)) from t3 order by 1,2;
  591. companynr rtrim(space(512+companynr))
  592. 37
  593. 78
  594. 101
  595. 154
  596. 311
  597. 447
  598. 512
  599. select distinct fld3 from t2,t3 where t2.companynr = 34 and t2.fld1=t3.t2nr order by fld3;
  600. fld3
  601. explain select t3.t2nr,fld3 from t2,t3 where t2.companynr = 34 and t2.fld1=t3.t2nr order by t3.t2nr,fld3;
  602. id select_type table type possible_keys key key_len ref rows Extra
  603. 1 SIMPLE t2 ALL fld1 NULL NULL NULL 1199 Using where; Using temporary; Using filesort
  604. 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.fld1 1 Using where; Using index
  605. explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period;
  606. id select_type table type possible_keys key key_len ref rows Extra
  607. 1 SIMPLE t1 ALL period NULL NULL NULL 41810 Using temporary; Using filesort
  608. 1 SIMPLE t3 ref period period 4 test.t1.period 4181
  609. explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period limit 10;
  610. id select_type table type possible_keys key key_len ref rows Extra
  611. 1 SIMPLE t3 index period period 4 NULL 41810
  612. 1 SIMPLE t1 ref period period 4 test.t3.period 4181
  613. explain select * from t3 as t1,t3 where t1.period=t3.period order by t1.period limit 10;
  614. id select_type table type possible_keys key key_len ref rows Extra
  615. 1 SIMPLE t1 index period period 4 NULL 41810
  616. 1 SIMPLE t3 ref period period 4 test.t1.period 4181
  617. select period from t1;
  618. period
  619. 9410
  620. select period from t1 where period=1900;
  621. period
  622. select fld3,period from t1,t2 where fld1 = 011401 order by period;
  623. fld3 period
  624. breaking 9410
  625. select fld3,period from t2,t3 where t2.fld1 = 011401 and t2.fld1=t3.t2nr and t3.period=1001;
  626. fld3 period
  627. breaking 1001
  628. explain select fld3,period from t2,t3 where t2.fld1 = 011401 and t3.t2nr=t2.fld1 and 1001 = t3.period;
  629. id select_type table type possible_keys key key_len ref rows Extra
  630. 1 SIMPLE t2 const fld1 fld1 4 const 1
  631. 1 SIMPLE t3 const PRIMARY,period PRIMARY 4 const 1
  632. select fld3,period from t2,t1 where companynr*10 = 37*10;
  633. fld3 period
  634. breaking 9410
  635. Romans 9410
  636. intercepted 9410
  637. bewilderingly 9410
  638. astound 9410
  639. admonishing 9410
  640. sumac 9410
  641. flanking 9410
  642. combed 9410
  643. subjective 9410
  644. scatterbrain 9410
  645. Eulerian 9410
  646. Kane 9410
  647. overlay 9410
  648. perturb 9410
  649. goblins 9410
  650. annihilates 9410
  651. Wotan 9410
  652. snatching 9410
  653. concludes 9410
  654. laterally 9410
  655. yelped 9410
  656. grazing 9410
  657. Baird 9410
  658. celery 9410
  659. misunderstander 9410
  660. handgun 9410
  661. foldout 9410
  662. mystic 9410
  663. succumbed 9410
  664. Nabisco 9410
  665. fingerings 9410
  666. aging 9410
  667. afield 9410
  668. ammonium 9410
  669. boat 9410
  670. intelligibility 9410
  671. Augustine 9410
  672. teethe 9410
  673. dreaded 9410
  674. scholastics 9410
  675. audiology 9410
  676. wallet 9410
  677. parters 9410
  678. eschew 9410
  679. quitter 9410
  680. neat 9410
  681. Steinberg 9410
  682. jarring 9410
  683. tinily 9410
  684. balled 9410
  685. persist 9410
  686. attainments 9410
  687. fanatic 9410
  688. measures 9410
  689. rightfulness 9410
  690. capably 9410
  691. impulsive 9410
  692. starlet 9410
  693. terminators 9410
  694. untying 9410
  695. announces 9410
  696. featherweight 9410
  697. pessimist 9410
  698. daughter 9410
  699. decliner 9410
  700. lawgiver 9410
  701. stated 9410
  702. readable 9410
  703. attrition 9410
  704. cascade 9410
  705. motors 9410
  706. interrogate 9410
  707. pests 9410
  708. stairway 9410
  709. dopers 9410
  710. testicle 9410
  711. Parsifal 9410
  712. leavings 9410
  713. postulation 9410
  714. squeaking 9410
  715. contrasted 9410
  716. leftover 9410
  717. whiteners 9410
  718. erases 9410
  719. Punjab 9410
  720. Merritt 9410
  721. Quixotism 9410
  722. sweetish 9410
  723. dogging 9410
  724. scornfully 9410
  725. bellow 9410
  726. bills 9410
  727. cupboard 9410
  728. sureties 9410
  729. puddings 9410
  730. fetters 9410
  731. bivalves 9410
  732. incurring 9410
  733. Adolph 9410
  734. pithed 9410
  735. Miles 9410
  736. trimmings 9410
  737. tragedies 9410
  738. skulking 9410
  739. flint 9410
  740. flopping 9410
  741. relaxing 9410
  742. offload 9410
  743. suites 9410
  744. lists 9410
  745. animized 9410
  746. multilayer 9410
  747. standardizes 9410
  748. Judas 9410
  749. vacuuming 9410
  750. dentally 9410
  751. humanness 9410
  752. inch 9410
  753. Weissmuller 9410
  754. irresponsibly 9410
  755. luckily 9410
  756. culled 9410
  757. medical 9410
  758. bloodbath 9410
  759. subschema 9410
  760. animals 9410
  761. Micronesia 9410
  762. repetitions 9410
  763. Antares 9410
  764. ventilate 9410
  765. pityingly 9410
  766. interdependent 9410
  767. Graves 9410
  768. neonatal 9410
  769. chafe 9410
  770. honoring 9410
  771. realtor 9410
  772. elite 9410
  773. funereal 9410
  774. abrogating 9410
  775. sorters 9410
  776. Conley 9410
  777. lectured 9410
  778. Abraham 9410
  779. Hawaii 9410
  780. cage 9410
  781. hushes 9410
  782. Simla 9410
  783. reporters 9410
  784. Dutchman 9410
  785. descendants 9410
  786. groupings 9410
  787. dissociate 9410
  788. coexist 9410
  789. Beebe 9410
  790. Taoism 9410
  791. Connally 9410
  792. fetched 9410
  793. checkpoints 9410
  794. rusting 9410
  795. galling 9410
  796. obliterates 9410
  797. traitor 9410
  798. resumes 9410
  799. analyzable 9410
  800. terminator 9410
  801. gritty 9410
  802. firearm 9410
  803. minima 9410
  804. Selfridge 9410
  805. disable 9410
  806. witchcraft 9410
  807. betroth 9410
  808. Manhattanize 9410
  809. imprint 9410
  810. peeked 9410
  811. swelling 9410
  812. interrelationships 9410
  813. riser 9410
  814. Gandhian 9410
  815. peacock 9410
  816. bee 9410
  817. kanji 9410
  818. dental 9410
  819. scarf 9410
  820. chasm 9410
  821. insolence 9410
  822. syndicate 9410
  823. alike 9410
  824. imperial 9410
  825. convulsion 9410
  826. railway 9410
  827. validate 9410
  828. normalizes 9410
  829. comprehensive 9410
  830. chewing 9410
  831. denizen 9410
  832. schemer 9410
  833. chronicle 9410
  834. Kline 9410
  835. Anatole 9410
  836. partridges 9410
  837. brunch 9410
  838. recruited 9410
  839. dimensions 9410
  840. Chicana 9410
  841. announced 9410
  842. praised 9410
  843. employing 9410
  844. linear 9410
  845. quagmire 9410
  846. western 9410
  847. relishing 9410
  848. serving 9410
  849. scheduling 9410
  850. lore 9410
  851. eventful 9410
  852. arteriole 9410
  853. disentangle 9410
  854. cured 9410
  855. Fenton 9410
  856. avoidable 9410
  857. drains 9410
  858. detectably 9410
  859. husky 9410
  860. impelling 9410
  861. undoes 9410
  862. evened 9410
  863. squeezes 9410
  864. destroyer 9410
  865. rudeness 9410
  866. beaner 9410
  867. boorish 9410
  868. Everhart 9410
  869. encompass 9410
  870. mushrooms 9410
  871. Alison 9410
  872. externally 9410
  873. pellagra 9410
  874. cult 9410
  875. creek 9410
  876. Huffman 9410
  877. Majorca 9410
  878. governing 9410
  879. gadfly 9410
  880. reassigned 9410
  881. intentness 9410
  882. craziness 9410
  883. psychic 9410
  884. squabbled 9410
  885. burlesque 9410
  886. capped 9410
  887. extracted 9410
  888. DiMaggio 9410
  889. exclamation 9410
  890. subdirectory 9410
  891. Gothicism 9410
  892. feminine 9410
  893. metaphysically 9410
  894. sanding 9410
  895. Miltonism 9410
  896. freakish 9410
  897. index 9410
  898. straight 9410
  899. flurried 9410
  900. denotative 9410
  901. coming 9410
  902. commencements 9410
  903. gentleman 9410
  904. gifted 9410
  905. Shanghais 9410
  906. sportswriting 9410
  907. sloping 9410
  908. navies 9410
  909. leaflet 9410
  910. shooter 9410
  911. Joplin 9410
  912. babies 9410
  913. assails 9410
  914. admiring 9410
  915. swaying 9410
  916. Goldstine 9410
  917. fitting 9410
  918. Norwalk 9410
  919. analogy 9410
  920. deludes 9410
  921. cokes 9410
  922. Clayton 9410
  923. exhausts 9410
  924. causality 9410
  925. sating 9410
  926. icon 9410
  927. throttles 9410
  928. communicants 9410
  929. dehydrate 9410
  930. priceless 9410
  931. publicly 9410
  932. incidentals 9410
  933. commonplace 9410
  934. mumbles 9410
  935. furthermore 9410
  936. cautioned 9410
  937. parametrized 9410
  938. registration 9410
  939. sadly 9410
  940. positioning 9410
  941. babysitting 9410
  942. eternal 9410
  943. hoarder 9410
  944. congregates 9410
  945. rains 9410
  946. workers 9410
  947. sags 9410
  948. unplug 9410
  949. garage 9410
  950. boulder 9410
  951. specifics 9410
  952. Teresa 9410
  953. Winsett 9410
  954. convenient 9410
  955. buckboards 9410
  956. amenities 9410
  957. resplendent 9410
  958. sews 9410
  959. participated 9410
  960. Simon 9410
  961. certificates 9410
  962. Fitzpatrick 9410
  963. Evanston 9410
  964. misted 9410
  965. textures 9410
  966. save 9410
  967. count 9410
  968. rightful 9410
  969. chaperone 9410
  970. Lizzy 9410
  971. clenched 9410
  972. effortlessly 9410
  973. accessed 9410
  974. beaters 9410
  975. Hornblower 9410
  976. vests 9410
  977. indulgences 9410
  978. infallibly 9410
  979. unwilling 9410
  980. excrete 9410
  981. spools 9410
  982. crunches 9410
  983. overestimating 9410
  984. ineffective 9410
  985. humiliation 9410
  986. sophomore 9410
  987. star 9410
  988. rifles 9410
  989. dialysis 9410
  990. arriving 9410
  991. indulge 9410
  992. clockers 9410
  993. languages 9410
  994. Antarctica 9410
  995. percentage 9410
  996. ceiling 9410
  997. specification 9410
  998. regimented 9410
  999. ciphers 9410
  1000. pictures 9410
  1001. serpents 9410
  1002. allot 9410
  1003. realized 9410
  1004. mayoral 9410
  1005. opaquely 9410
  1006. hostess 9410
  1007. fiftieth 9410
  1008. incorrectly 9410
  1009. decomposition 9410
  1010. stranglings 9410
  1011. mixture 9410
  1012. electroencephalography 9410
  1013. similarities 9410
  1014. charges 9410
  1015. freest 9410
  1016. Greenberg 9410
  1017. tinting 9410
  1018. expelled 9410
  1019. warm 9410
  1020. smoothed 9410
  1021. deductions 9410
  1022. Romano 9410
  1023. bitterroot 9410
  1024. corset 9410
  1025. securing 9410
  1026. environing 9410
  1027. cute 9410
  1028. Crays 9410
  1029. heiress 9410
  1030. inform 9410
  1031. avenge 9410
  1032. universals 9410
  1033. Kinsey 9410
  1034. ravines 9410
  1035. bestseller 9410
  1036. equilibrium 9410
  1037. extents 9410
  1038. relatively 9410
  1039. pressure 9410
  1040. critiques 9410
  1041. befouled 9410
  1042. rightfully 9410
  1043. mechanizing 9410
  1044. Latinizes 9410
  1045. timesharing 9410
  1046. Aden 9410
  1047. embassies 9410
  1048. males 9410
  1049. shapelessly 9410
  1050. mastering 9410
  1051. Newtonian 9410
  1052. finishers 9410
  1053. abates 9410
  1054. teem 9410
  1055. kiting 9410
  1056. stodgy 9410
  1057. feed 9410
  1058. guitars 9410
  1059. airships 9410
  1060. store 9410
  1061. denounces 9410
  1062. Pyle 9410
  1063. Saxony 9410
  1064. serializations 9410
  1065. Peruvian 9410
  1066. taxonomically 9410
  1067. kingdom 9410
  1068. stint 9410
  1069. Sault 9410
  1070. faithful 9410
  1071. Ganymede 9410
  1072. tidiness 9410
  1073. gainful 9410
  1074. contrary 9410
  1075. Tipperary 9410
  1076. tropics 9410
  1077. theorizers 9410
  1078. renew 9410
  1079. already 9410
  1080. terminal 9410
  1081. Hegelian 9410
  1082. hypothesizer 9410
  1083. warningly 9410
  1084. journalizing 9410
  1085. nested 9410
  1086. Lars 9410
  1087. saplings 9410
  1088. foothill 9410
  1089. labeled 9410
  1090. imperiously 9410
  1091. reporters 9410
  1092. furnishings 9410
  1093. precipitable 9410
  1094. discounts 9410
  1095. excises 9410
  1096. Stalin 9410
  1097. despot 9410
  1098. ripeness 9410
  1099. Arabia 9410
  1100. unruly 9410
  1101. mournfulness 9410
  1102. boom 9410
  1103. slaughter 9410
  1104. Sabine 9410
  1105. handy 9410
  1106. rural 9410
  1107. organizer 9410
  1108. shipyard 9410
  1109. civics 9410
  1110. inaccuracy 9410
  1111. rules 9410
  1112. juveniles 9410
  1113. comprised 9410
  1114. investigations 9410
  1115. stabilizes 9410
  1116. seminaries 9410
  1117. Hunter 9410
  1118. sporty 9410
  1119. test 9410
  1120. weasels 9410
  1121. CERN 9410
  1122. tempering 9410
  1123. afore 9410
  1124. Galatean 9410
  1125. techniques 9410
  1126. error 9410
  1127. veranda 9410
  1128. severely 9410
  1129. Cassites 9410
  1130. forthcoming 9410
  1131. guides 9410
  1132. vanish 9410
  1133. lied 9410
  1134. sawtooth 9410
  1135. fated 9410
  1136. gradually 9410
  1137. widens 9410
  1138. preclude 9410
  1139. evenhandedly 9410
  1140. percentage 9410
  1141. disobedience 9410
  1142. humility 9410
  1143. gleaning 9410
  1144. petted 9410
  1145. bloater 9410
  1146. minion 9410
  1147. marginal 9410
  1148. apiary 9410
  1149. measures 9410
  1150. precaution 9410
  1151. repelled 9410
  1152. primary 9410
  1153. coverings 9410
  1154. Artemia 9410
  1155. navigate 9410
  1156. spatial 9410
  1157. Gurkha 9410
  1158. meanwhile 9410
  1159. Melinda 9410
  1160. Butterfield 9410
  1161. Aldrich 9410
  1162. previewing 9410
  1163. glut 9410
  1164. unaffected 9410
  1165. inmate 9410
  1166. mineral 9410
  1167. impending 9410
  1168. meditation 9410
  1169. ideas 9410
  1170. miniaturizes 9410
  1171. lewdly 9410
  1172. title 9410
  1173. youthfulness 9410
  1174. creak 9410
  1175. Chippewa 9410
  1176. clamored 9410
  1177. freezes 9410
  1178. forgivably 9410
  1179. reduce 9410
  1180. McGovern 9410
  1181. Nazis 9410
  1182. epistle 9410
  1183. socializes 9410
  1184. conceptions 9410
  1185. Kevin 9410
  1186. uncovering 9410
  1187. chews 9410
  1188. appendixes 9410
  1189. appendixes 9410
  1190. appendixes 9410
  1191. appendixes 9410
  1192. appendixes 9410
  1193. appendixes 9410
  1194. raining 9410
  1195. infest 9410
  1196. compartment 9410
  1197. minting 9410
  1198. ducks 9410
  1199. roped 9410
  1200. waltz 9410
  1201. Lillian 9410
  1202. repressions 9410
  1203. chillingly 9410
  1204. noncritical 9410
  1205. lithograph 9410
  1206. spongers 9410
  1207. parenthood 9410
  1208. posed 9410
  1209. instruments 9410
  1210. filial 9410
  1211. fixedly 9410
  1212. relives 9410
  1213. Pandora 9410
  1214. watering 9410
  1215. ungrateful 9410
  1216. secures 9410
  1217. poison 9410
  1218. dusted 9410
  1219. encompasses 9410
  1220. presentation 9410
  1221. Kantian 9410
  1222. select fld3,period,price,price2 from t2,t3 where t2.fld1=t3.t2nr and period >= 1001 and period <= 1002 and t2.companynr = 37 order by fld3,period, price;
  1223. fld3 period price price2
  1224. admonishing 1002 28357832 8723648
  1225. analyzable 1002 28357832 8723648
  1226. annihilates 1001 5987435 234724
  1227. Antares 1002 28357832 8723648
  1228. astound 1001 5987435 234724
  1229. audiology 1001 5987435 234724
  1230. Augustine 1002 28357832 8723648
  1231. Baird 1002 28357832 8723648
  1232. bewilderingly 1001 5987435 234724
  1233. breaking 1001 5987435 234724
  1234. Conley 1001 5987435 234724
  1235. dentally 1002 28357832 8723648
  1236. dissociate 1002 28357832 8723648
  1237. elite 1001 5987435 234724
  1238. eschew 1001 5987435 234724
  1239. Eulerian 1001 5987435 234724
  1240. flanking 1001 5987435 234724
  1241. foldout 1002 28357832 8723648
  1242. funereal 1002 28357832 8723648
  1243. galling 1002 28357832 8723648
  1244. Graves 1001 5987435 234724
  1245. grazing 1001 5987435 234724
  1246. groupings 1001 5987435 234724
  1247. handgun 1001 5987435 234724
  1248. humility 1002 28357832 8723648
  1249. impulsive 1002 28357832 8723648
  1250. inch 1001 5987435 234724
  1251. intelligibility 1001 5987435 234724
  1252. jarring 1001 5987435 234724
  1253. lawgiver 1001 5987435 234724
  1254. lectured 1002 28357832 8723648
  1255. Merritt 1002 28357832 8723648
  1256. neonatal 1001 5987435 234724
  1257. offload 1002 28357832 8723648
  1258. parters 1002 28357832 8723648
  1259. pityingly 1002 28357832 8723648
  1260. puddings 1002 28357832 8723648
  1261. Punjab 1001 5987435 234724
  1262. quitter 1002 28357832 8723648
  1263. realtor 1001 5987435 234724
  1264. relaxing 1001 5987435 234724
  1265. repetitions 1001 5987435 234724
  1266. resumes 1001 5987435 234724
  1267. Romans 1002 28357832 8723648
  1268. rusting 1001 5987435 234724
  1269. scholastics 1001 5987435 234724
  1270. skulking 1002 28357832 8723648
  1271. stated 1002 28357832 8723648
  1272. suites 1002 28357832 8723648
  1273. sureties 1001 5987435 234724
  1274. testicle 1002 28357832 8723648
  1275. tinily 1002 28357832 8723648
  1276. tragedies 1001 5987435 234724
  1277. trimmings 1001 5987435 234724
  1278. vacuuming 1001 5987435 234724
  1279. ventilate 1001 5987435 234724
  1280. wallet 1001 5987435 234724
  1281. Weissmuller 1002 28357832 8723648
  1282. Wotan 1002 28357832 8723648
  1283. select t2.fld1,fld3,period,price,price2 from t2,t3 where t2.fld1>= 18201 and t2.fld1 <= 18811 and t2.fld1=t3.t2nr and period = 1001 and t2.companynr = 37;
  1284. fld1 fld3 period price price2
  1285. 018201 relaxing 1001 5987435 234724
  1286. 018601 vacuuming 1001 5987435 234724
  1287. 018801 inch 1001 5987435 234724
  1288. 018811 repetitions 1001 5987435 234724
  1289. create table t4 (
  1290. companynr tinyint(2) unsigned zerofill NOT NULL default '00',
  1291. companyname char(30) NOT NULL default '',
  1292. PRIMARY KEY (companynr),
  1293. UNIQUE KEY companyname(companyname)
  1294. ) ENGINE=MyISAM MAX_ROWS=50 PACK_KEYS=1 COMMENT='companynames';
  1295. select STRAIGHT_JOIN t2.companynr,companyname from t4,t2 where t2.companynr=t4.companynr group by t2.companynr;
  1296. companynr companyname
  1297. 00 Unknown
  1298. 29 company 1
  1299. 34 company 2
  1300. 36 company 3
  1301. 37 company 4
  1302. 40 company 5
  1303. 41 company 6
  1304. 50 company 11
  1305. 53 company 7
  1306. 58 company 8
  1307. 65 company 9
  1308. 68 company 10
  1309. select SQL_SMALL_RESULT t2.companynr,companyname from t4,t2 where t2.companynr=t4.companynr group by t2.companynr;
  1310. companynr companyname
  1311. 00 Unknown
  1312. 29 company 1
  1313. 34 company 2
  1314. 36 company 3
  1315. 37 company 4
  1316. 40 company 5
  1317. 41 company 6
  1318. 50 company 11
  1319. 53 company 7
  1320. 58 company 8
  1321. 65 company 9
  1322. 68 company 10
  1323. select * from t1,t1 t12;
  1324. Period Varor_period Period Varor_period
  1325. 9410 9412 9410 9412
  1326. select t2.fld1,t22.fld1 from t2,t2 t22 where t2.fld1 >= 250501 and t2.fld1 <= 250505 and t22.fld1 >= 250501 and t22.fld1 <= 250505;
  1327. fld1 fld1
  1328. 250501 250501
  1329. 250502 250501
  1330. 250503 250501
  1331. 250504 250501
  1332. 250505 250501
  1333. 250501 250502
  1334. 250502 250502
  1335. 250503 250502
  1336. 250504 250502
  1337. 250505 250502
  1338. 250501 250503
  1339. 250502 250503
  1340. 250503 250503
  1341. 250504 250503
  1342. 250505 250503
  1343. 250501 250504
  1344. 250502 250504
  1345. 250503 250504
  1346. 250504 250504
  1347. 250505 250504
  1348. 250501 250505
  1349. 250502 250505
  1350. 250503 250505
  1351. 250504 250505
  1352. 250505 250505
  1353. insert into t2 (fld1, companynr) values (999999,99);
  1354. select t2.companynr,companyname from t2 left join t4 using (companynr) where t4.companynr is null;
  1355. companynr companyname
  1356. 99 NULL
  1357. select count(*) from t2 left join t4 using (companynr) where t4.companynr is not null;
  1358. count(*)
  1359. 1199
  1360. explain select t2.companynr,companyname from t2 left join t4 using (companynr) where t4.companynr is null;
  1361. id select_type table type possible_keys key key_len ref rows Extra
  1362. 1 SIMPLE t2 ALL NULL NULL NULL NULL 1200
  1363. 1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using where; Not exists
  1364. explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr is null;
  1365. id select_type table type possible_keys key key_len ref rows Extra
  1366. 1 SIMPLE t4 ALL NULL NULL NULL NULL 12
  1367. 1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where; Not exists
  1368. select companynr,companyname from t2 left join t4 using (companynr) where companynr is null;
  1369. companynr companyname
  1370. select count(*) from t2 left join t4 using (companynr) where companynr is not null;
  1371. count(*)
  1372. 1200
  1373. explain select companynr,companyname from t2 left join t4 using (companynr) where companynr is null;
  1374. id select_type table type possible_keys key key_len ref rows Extra
  1375. 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
  1376. explain select companynr,companyname from t4 left join t2 using (companynr) where companynr is null;
  1377. id select_type table type possible_keys key key_len ref rows Extra
  1378. 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
  1379. delete from t2 where fld1=999999;
  1380. explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0;
  1381. id select_type table type possible_keys key key_len ref rows Extra
  1382. 1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
  1383. 1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1
  1384. explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0;
  1385. id select_type table type possible_keys key key_len ref rows Extra
  1386. 1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
  1387. 1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1
  1388. explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 and t4.companynr > 0;
  1389. id select_type table type possible_keys key key_len ref rows Extra
  1390. 1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
  1391. 1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1
  1392. explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0;
  1393. id select_type table type possible_keys key key_len ref rows Extra
  1394. 1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
  1395. 1 SIMPLE t2 ALL NULL NULL NULL NULL 1199
  1396. explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0;
  1397. id select_type table type possible_keys key key_len ref rows Extra
  1398. 1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
  1399. 1 SIMPLE t2 ALL NULL NULL NULL NULL 1199
  1400. explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 and companynr > 0;
  1401. id select_type table type possible_keys key key_len ref rows Extra
  1402. 1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
  1403. 1 SIMPLE t2 ALL NULL NULL NULL NULL 1199
  1404. explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr is null;
  1405. id select_type table type possible_keys key key_len ref rows Extra
  1406. 1 SIMPLE t4 ALL NULL NULL NULL NULL 12
  1407. 1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
  1408. explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0 or t4.companynr > 0;
  1409. id select_type table type possible_keys key key_len ref rows Extra
  1410. 1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12
  1411. 1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
  1412. explain select t2.companynr,companyname from t4 left join t2 using (companynr) where ifnull(t2.companynr,1)>0;
  1413. id select_type table type possible_keys key key_len ref rows Extra
  1414. 1 SIMPLE t4 ALL NULL NULL NULL NULL 12
  1415. 1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
  1416. explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr is null;
  1417. id select_type table type possible_keys key key_len ref rows Extra
  1418. 1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
  1419. 1 SIMPLE t2 ALL NULL NULL NULL NULL 1199
  1420. explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0 or companynr > 0;
  1421. id select_type table type possible_keys key key_len ref rows Extra
  1422. 1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
  1423. 1 SIMPLE t2 ALL NULL NULL NULL NULL 1199
  1424. explain select companynr,companyname from t4 left join t2 using (companynr) where ifnull(companynr,1)>0;
  1425. id select_type table type possible_keys key key_len ref rows Extra
  1426. 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
  1427. 1 SIMPLE t2 ALL NULL NULL NULL NULL 1199
  1428. select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1;
  1429. companynr companynr
  1430. 37 36
  1431. 41 40
  1432. explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1;
  1433. id select_type table type possible_keys key key_len ref rows Extra
  1434. 1 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using index; Using temporary
  1435. 1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
  1436. select t2.fld1,t2.companynr,fld3,period from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period = 1008;
  1437. fld1 companynr fld3 period
  1438. 038008 37 reporters 1008
  1439. 038208 37 Selfridge 1008
  1440. select t2.fld1,t2.companynr,fld3,period from t3,t2 where (t2.fld1 = 38208 or t2.fld1 = 38008) and t2.fld1=t3.t2nr and period>=1008 and period<=1009;
  1441. fld1 companynr fld3 period
  1442. 038008 37 reporters 1008
  1443. 038208 37 Selfridge 1008
  1444. select t2.fld1,t2.companynr,fld3,period from t3,t2 where (t3.t2nr = 38208 or t3.t2nr = 38008) and t2.fld1=t3.t2nr and period>=1008 and period<=1009;
  1445. fld1 companynr fld3 period
  1446. 038008 37 reporters 1008
  1447. 038208 37 Selfridge 1008
  1448. select period from t1 where (((period > 0) or period < 10000 or (period = 1900)) and (period=1900 and period <= 1901) or (period=1903 and (period=1903)) and period>=1902) or ((period=1904 or period=1905) or (period=1906 or period>1907)) or (period=1908 and period = 1909);
  1449. period
  1450. 9410
  1451. select period from t1 where ((period > 0 and period < 1) or (((period > 0 and period < 100) and (period > 10)) or (period > 10)) or (period > 0 and (period > 5 or period > 6)));
  1452. period
  1453. 9410
  1454. select a.fld1 from t2 as a,t2 b where ((a.fld1 = 250501 and a.fld1=b.fld1) or a.fld1=250502 or a.fld1=250503 or (a.fld1=250505 and a.fld1<=b.fld1 and b.fld1>=a.fld1)) and a.fld1=b.fld1;
  1455. fld1
  1456. 250501
  1457. 250502
  1458. 250503
  1459. 250505
  1460. select fld1 from t2 where fld1 in (250502,98005,98006,250503,250605,250606) and fld1 >=250502 and fld1 not in (250605,250606);
  1461. fld1
  1462. 250502
  1463. 250503
  1464. select fld1 from t2 where fld1 between 250502 and 250504;
  1465. fld1
  1466. 250502
  1467. 250503
  1468. 250504
  1469. select fld3 from t2 where (((fld3 like "_%L%" ) or (fld3 like "%ok%")) and ( fld3 like "L%" or fld3 like "G%")) and fld3 like "L%" ;
  1470. fld3
  1471. label
  1472. labeled
  1473. labeled
  1474. landslide
  1475. laterally
  1476. leaflet
  1477. lewdly
  1478. Lillian
  1479. luckily
  1480. select count(*) from t1;
  1481. count(*)
  1482. 1
  1483. select companynr,count(*),sum(fld1) from t2 group by companynr;
  1484. companynr count(*) sum(fld1)
  1485. 00 82 10355753
  1486. 29 95 14473298
  1487. 34 70 17788966
  1488. 36 215 22786296
  1489. 37 588 83602098
  1490. 40 37 6618386
  1491. 41 52 12816335
  1492. 50 11 1595438
  1493. 53 4 793210
  1494. 58 23 2254293
  1495. 65 10 2284055
  1496. 68 12 3097288
  1497. select companynr,count(*) from t2 group by companynr order by companynr desc limit 5;
  1498. companynr count(*)
  1499. 68 12
  1500. 65 10
  1501. 58 23
  1502. 53 4
  1503. 50 11
  1504. select count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 where companynr = 34 and fld4<>"";
  1505. count(*) min(fld4) max(fld4) sum(fld1) avg(fld1) std(fld1) variance(fld1)
  1506. 70 absentee vest 17788966 254128.0857 3272.5940 10709871.3069
  1507. explain extended select count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 where companynr = 34 and fld4<>"";
  1508. id select_type table type possible_keys key key_len ref rows Extra
  1509. 1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
  1510. Warnings:
  1511. Note 1003 select count(0) AS `count(*)`,min(`test`.`t2`.`fld4`) AS `min(fld4)`,max(`test`.`t2`.`fld4`) AS `max(fld4)`,sum(`test`.`t2`.`fld1`) AS `sum(fld1)`,avg(`test`.`t2`.`fld1`) AS `avg(fld1)`,std(`test`.`t2`.`fld1`) AS `std(fld1)`,variance(`test`.`t2`.`fld1`) AS `variance(fld1)` from `test`.`t2` where ((`test`.`t2`.`companynr` = 34) and (`test`.`t2`.`fld4` <> _latin1''))
  1512. select companynr,count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 group by companynr limit 3;
  1513. companynr count(*) min(fld4) max(fld4) sum(fld1) avg(fld1) std(fld1) variance(fld1)
  1514. 00 82 Anthony windmills 10355753 126289.6707 115550.9757 13352027981.7087
  1515. 29 95 abut wetness 14473298 152350.5053 8368.5480 70032594.9026
  1516. 34 70 absentee vest 17788966 254128.0857 3272.5940 10709871.3069
  1517. select companynr,t2nr,count(price),sum(price),min(price),max(price),avg(price) from t3 where companynr = 37 group by companynr,t2nr limit 10;
  1518. companynr t2nr count(price) sum(price) min(price) max(price) avg(price)
  1519. 37 1 1 5987435 5987435 5987435 5987435.0000
  1520. 37 2 1 28357832 28357832 28357832 28357832.0000
  1521. 37 3 1 39654943 39654943 39654943 39654943.0000
  1522. 37 11 1 5987435 5987435 5987435 5987435.0000
  1523. 37 12 1 28357832 28357832 28357832 28357832.0000
  1524. 37 13 1 39654943 39654943 39654943 39654943.0000
  1525. 37 21 1 5987435 5987435 5987435 5987435.0000
  1526. 37 22 1 28357832 28357832 28357832 28357832.0000
  1527. 37 23 1 39654943 39654943 39654943 39654943.0000
  1528. 37 31 1 5987435 5987435 5987435 5987435.0000
  1529. select /*! SQL_SMALL_RESULT */ companynr,t2nr,count(price),sum(price),min(price),max(price),avg(price) from t3 where companynr = 37 group by companynr,t2nr limit 10;
  1530. companynr t2nr count(price) sum(price) min(price) max(price) avg(price)
  1531. 37 1 1 5987435 5987435 5987435 5987435.0000
  1532. 37 2 1 28357832 28357832 28357832 28357832.0000
  1533. 37 3 1 39654943 39654943 39654943 39654943.0000
  1534. 37 11 1 5987435 5987435 5987435 5987435.0000
  1535. 37 12 1 28357832 28357832 28357832 28357832.0000
  1536. 37 13 1 39654943 39654943 39654943 39654943.0000
  1537. 37 21 1 5987435 5987435 5987435 5987435.0000
  1538. 37 22 1 28357832 28357832 28357832 28357832.0000
  1539. 37 23 1 39654943 39654943 39654943 39654943.0000
  1540. 37 31 1 5987435 5987435 5987435 5987435.0000
  1541. select companynr,count(price),sum(price),min(price),max(price),avg(price) from t3 group by companynr ;
  1542. companynr count(price) sum(price) min(price) max(price) avg(price)
  1543. 37 12543 309394878010 5987435 39654943 24666736.6667
  1544. 78 8362 414611089292 726498 98439034 49582766.0000
  1545. 101 4181 3489454238 834598 834598 834598.0000
  1546. 154 4181 4112197254950 983543950 983543950 983543950.0000
  1547. 311 4181 979599938 234298 234298 234298.0000
  1548. 447 4181 9929180954 2374834 2374834 2374834.0000
  1549. 512 4181 3288532102 786542 786542 786542.0000
  1550. select distinct mod(companynr,10) from t4 group by companynr;
  1551. mod(companynr,10)
  1552. 0
  1553. 9
  1554. 4
  1555. 6
  1556. 7
  1557. 1
  1558. 3
  1559. 8
  1560. 5
  1561. select distinct 1 from t4 group by companynr;
  1562. 1
  1563. 1
  1564. select count(distinct fld1) from t2;
  1565. count(distinct fld1)
  1566. 1199
  1567. select companynr,count(distinct fld1) from t2 group by companynr;
  1568. companynr count(distinct fld1)
  1569. 00 82
  1570. 29 95
  1571. 34 70
  1572. 36 215
  1573. 37 588
  1574. 40 37
  1575. 41 52
  1576. 50 11
  1577. 53 4
  1578. 58 23
  1579. 65 10
  1580. 68 12
  1581. select companynr,count(*) from t2 group by companynr;
  1582. companynr count(*)
  1583. 00 82
  1584. 29 95
  1585. 34 70
  1586. 36 215
  1587. 37 588
  1588. 40 37
  1589. 41 52
  1590. 50 11
  1591. 53 4
  1592. 58 23
  1593. 65 10
  1594. 68 12
  1595. select companynr,count(distinct concat(fld1,repeat(65,1000))) from t2 group by companynr;
  1596. companynr count(distinct concat(fld1,repeat(65,1000)))
  1597. 00 82
  1598. 29 95
  1599. 34 70
  1600. 36 215
  1601. 37 588
  1602. 40 37
  1603. 41 52
  1604. 50 11
  1605. 53 4
  1606. 58 23
  1607. 65 10
  1608. 68 12
  1609. select companynr,count(distinct concat(fld1,repeat(65,200))) from t2 group by companynr;
  1610. companynr count(distinct concat(fld1,repeat(65,200)))
  1611. 00 82
  1612. 29 95
  1613. 34 70
  1614. 36 215
  1615. 37 588
  1616. 40 37
  1617. 41 52
  1618. 50 11
  1619. 53 4
  1620. 58 23
  1621. 65 10
  1622. 68 12
  1623. select companynr,count(distinct floor(fld1/100)) from t2 group by companynr;
  1624. companynr count(distinct floor(fld1/100))
  1625. 00 47
  1626. 29 35
  1627. 34 14
  1628. 36 69
  1629. 37 108
  1630. 40 16
  1631. 41 11
  1632. 50 9
  1633. 53 1
  1634. 58 1
  1635. 65 1
  1636. 68 1
  1637. select companynr,count(distinct concat(repeat(65,1000),floor(fld1/100))) from t2 group by companynr;
  1638. companynr count(distinct concat(repeat(65,1000),floor(fld1/100)))
  1639. 00 47
  1640. 29 35
  1641. 34 14
  1642. 36 69
  1643. 37 108
  1644. 40 16
  1645. 41 11
  1646. 50 9
  1647. 53 1
  1648. 58 1
  1649. 65 1
  1650. 68 1
  1651. select sum(fld1),fld3 from t2 where fld3="Romans" group by fld1 limit 10;
  1652. sum(fld1) fld3
  1653. 11402 Romans
  1654. select name,count(*) from t3 where name='cloakroom' group by name;
  1655. name count(*)
  1656. cloakroom 4181
  1657. select name,count(*) from t3 where name='cloakroom' and price>10 group by name;
  1658. name count(*)
  1659. cloakroom 4181
  1660. select count(*) from t3 where name='cloakroom' and price2=823742;
  1661. count(*)
  1662. 4181
  1663. select name,count(*) from t3 where name='cloakroom' and price2=823742 group by name;
  1664. name count(*)
  1665. cloakroom 4181
  1666. select name,count(*) from t3 where name >= "extramarital" and price <= 39654943 group by name;
  1667. name count(*)
  1668. extramarital 4181
  1669. gazer 4181
  1670. gems 4181
  1671. Iranizes 4181
  1672. spates 4181
  1673. tucked 4181
  1674. violinist 4181
  1675. select t2.fld3,count(*) from t2,t3 where t2.fld1=158402 and t3.name=t2.fld3 group by t3.name;
  1676. fld3 count(*)
  1677. spates 4181
  1678. select companynr|0,companyname from t4 group by 1;
  1679. companynr|0 companyname
  1680. 0 Unknown
  1681. 29 company 1
  1682. 34 company 2
  1683. 36 company 3
  1684. 37 company 4
  1685. 40 company 5
  1686. 41 company 6
  1687. 50 company 11
  1688. 53 company 7
  1689. 58 company 8
  1690. 65 company 9
  1691. 68 company 10
  1692. select t2.companynr,companyname,count(*) from t2,t4 where t2.companynr=t4.companynr group by t2.companynr order by companyname;
  1693. companynr companyname count(*)
  1694. 29 company 1 95
  1695. 68 company 10 12
  1696. 50 company 11 11
  1697. 34 company 2 70
  1698. 36 company 3 215
  1699. 37 company 4 588
  1700. 40 company 5 37
  1701. 41 company 6 52
  1702. 53 company 7 4
  1703. 58 company 8 23
  1704. 65 company 9 10
  1705. 00 Unknown 82
  1706. select t2.fld1,count(*) from t2,t3 where t2.fld1=158402 and t3.name=t2.fld3 group by t3.name;
  1707. fld1 count(*)
  1708. 158402 4181
  1709. select sum(Period)/count(*) from t1;
  1710. sum(Period)/count(*)
  1711. 9410.0000
  1712. select companynr,count(price) as "count",sum(price) as "sum" ,abs(sum(price)/count(price)-avg(price)) as "diff",(0+count(price))*companynr as func from t3 group by companynr;
  1713. companynr count sum diff func
  1714. 37 12543 309394878010 0.0000 464091
  1715. 78 8362 414611089292 0.0000 652236
  1716. 101 4181 3489454238 0.0000 422281
  1717. 154 4181 4112197254950 0.0000 643874
  1718. 311 4181 979599938 0.0000 1300291
  1719. 447 4181 9929180954 0.0000 1868907
  1720. 512 4181 3288532102 0.0000 2140672
  1721. select companynr,sum(price)/count(price) as avg from t3 group by companynr having avg > 70000000 order by avg;
  1722. companynr avg
  1723. 154 983543950.0000
  1724. select companynr,count(*) from t2 group by companynr order by 2 desc;
  1725. companynr count(*)
  1726. 37 588
  1727. 36 215
  1728. 29 95
  1729. 00 82
  1730. 34 70
  1731. 41 52
  1732. 40 37
  1733. 58 23
  1734. 68 12
  1735. 50 11
  1736. 65 10
  1737. 53 4
  1738. select companynr,count(*) from t2 where companynr > 40 group by companynr order by 2 desc;
  1739. companynr count(*)
  1740. 41 52
  1741. 58 23
  1742. 68 12
  1743. 50 11
  1744. 65 10
  1745. 53 4
  1746. select t2.fld4,t2.fld1,count(price),sum(price),min(price),max(price),avg(price) from t3,t2 where t3.companynr = 37 and t2.fld1 = t3.t2nr group by fld1,t2.fld4;
  1747. fld4 fld1 count(price) sum(price) min(price) max(price) avg(price)
  1748. teethe 000001 1 5987435 5987435 5987435 5987435.0000
  1749. dreaded 011401 1 5987435 5987435 5987435 5987435.0000
  1750. scholastics 011402 1 28357832 28357832 28357832 28357832.0000
  1751. audiology 011403 1 39654943 39654943 39654943 39654943.0000
  1752. wallet 011501 1 5987435 5987435 5987435 5987435.0000
  1753. parters 011701 1 5987435 5987435 5987435 5987435.0000
  1754. eschew 011702 1 28357832 28357832 28357832 28357832.0000
  1755. quitter 011703 1 39654943 39654943 39654943 39654943.0000
  1756. neat 012001 1 5987435 5987435 5987435 5987435.0000
  1757. Steinberg 012003 1 39654943 39654943 39654943 39654943.0000
  1758. balled 012301 1 5987435 5987435 5987435 5987435.0000
  1759. persist 012302 1 28357832 28357832 28357832 28357832.0000
  1760. attainments 012303 1 39654943 39654943 39654943 39654943.0000
  1761. capably 012501 1 5987435 5987435 5987435 5987435.0000
  1762. impulsive 012602 1 28357832 28357832 28357832 28357832.0000
  1763. starlet 012603 1 39654943 39654943 39654943 39654943.0000
  1764. featherweight 012701 1 5987435 5987435 5987435 5987435.0000
  1765. pessimist 012702 1 28357832 28357832 28357832 28357832.0000
  1766. daughter 012703 1 39654943 39654943 39654943 39654943.0000
  1767. lawgiver 013601 1 5987435 5987435 5987435 5987435.0000
  1768. stated 013602 1 28357832 28357832 28357832 28357832.0000
  1769. readable 013603 1 39654943 39654943 39654943 39654943.0000
  1770. testicle 013801 1 5987435 5987435 5987435 5987435.0000
  1771. Parsifal 013802 1 28357832 28357832 28357832 28357832.0000
  1772. leavings 013803 1 39654943 39654943 39654943 39654943.0000
  1773. squeaking 013901 1 5987435 5987435 5987435 5987435.0000
  1774. contrasted 016001 1 5987435 5987435 5987435 5987435.0000
  1775. leftover 016201 1 5987435 5987435 5987435 5987435.0000
  1776. whiteners 016202 1 28357832 28357832 28357832 28357832.0000
  1777. erases 016301 1 5987435 5987435 5987435 5987435.0000
  1778. Punjab 016302 1 28357832 28357832 28357832 28357832.0000
  1779. Merritt 016303 1 39654943 39654943 39654943 39654943.0000
  1780. sweetish 018001 1 5987435 5987435 5987435 5987435.0000
  1781. dogging 018002 1 28357832 28357832 28357832 28357832.0000
  1782. scornfully 018003 1 39654943 39654943 39654943 39654943.0000
  1783. fetters 018012 1 28357832 28357832 28357832 28357832.0000
  1784. bivalves 018013 1 39654943 39654943 39654943 39654943.0000
  1785. skulking 018021 1 5987435 5987435 5987435 5987435.0000
  1786. flint 018022 1 28357832 28357832 28357832 28357832.0000
  1787. flopping 018023 1 39654943 39654943 39654943 39654943.0000
  1788. Judas 018032 1 28357832 28357832 28357832 28357832.0000
  1789. vacuuming 018033 1 39654943 39654943 39654943 39654943.0000
  1790. medical 018041 1 5987435 5987435 5987435 5987435.0000
  1791. bloodbath 018042 1 28357832 28357832 28357832 28357832.0000
  1792. subschema 018043 1 39654943 39654943 39654943 39654943.0000
  1793. interdependent 018051 1 5987435 5987435 5987435 5987435.0000
  1794. Graves 018052 1 28357832 28357832 28357832 28357832.0000
  1795. neonatal 018053 1 39654943 39654943 39654943 39654943.0000
  1796. sorters 018061 1 5987435 5987435 5987435 5987435.0000
  1797. epistle 018062 1 28357832 28357832 28357832 28357832.0000
  1798. Conley 018101 1 5987435 5987435 5987435 5987435.0000
  1799. lectured 018102 1 28357832 28357832 28357832 28357832.0000
  1800. Abraham 018103 1 39654943 39654943 39654943 39654943.0000
  1801. cage 018201 1 5987435 5987435 5987435 5987435.0000
  1802. hushes 018202 1 28357832 28357832 28357832 28357832.0000
  1803. Simla 018402 1 28357832 28357832 28357832 28357832.0000
  1804. reporters 018403 1 39654943 39654943 39654943 39654943.0000
  1805. coexist 018601 1 5987435 5987435 5987435 5987435.0000
  1806. Beebe 018602 1 28357832 28357832 28357832 28357832.0000
  1807. Taoism 018603 1 39654943 39654943 39654943 39654943.0000
  1808. Connally 018801 1 5987435 5987435 5987435 5987435.0000
  1809. fetched 018802 1 28357832 28357832 28357832 28357832.0000
  1810. checkpoints 018803 1 39654943 39654943 39654943 39654943.0000
  1811. gritty 018811 1 5987435 5987435 5987435 5987435.0000
  1812. firearm 018812 1 28357832 28357832 28357832 28357832.0000
  1813. minima 019101 1 5987435 5987435 5987435 5987435.0000
  1814. Selfridge 019102 1 28357832 28357832 28357832 28357832.0000
  1815. disable 019103 1 39654943 39654943 39654943 39654943.0000
  1816. witchcraft 019201 1 5987435 5987435 5987435 5987435.0000
  1817. betroth 030501 1 5987435 5987435 5987435 5987435.0000
  1818. Manhattanize 030502 1 28357832 28357832 28357832 28357832.0000
  1819. imprint 030503 1 39654943 39654943 39654943 39654943.0000
  1820. swelling 031901 1 5987435 5987435 5987435 5987435.0000
  1821. interrelationships 036001 1 5987435 5987435 5987435 5987435.0000
  1822. riser 036002 1 28357832 28357832 28357832 28357832.0000
  1823. bee 038001 1 5987435 5987435 5987435 5987435.0000
  1824. kanji 038002 1 28357832 28357832 28357832 28357832.0000
  1825. dental 038003 1 39654943 39654943 39654943 39654943.0000
  1826. railway 038011 1 5987435 5987435 5987435 5987435.0000
  1827. validate 038012 1 28357832 28357832 28357832 28357832.0000
  1828. normalizes 038013 1 39654943 39654943 39654943 39654943.0000
  1829. Kline 038101 1 5987435 5987435 5987435 5987435.0000
  1830. Anatole 038102 1 28357832 28357832 28357832 28357832.0000
  1831. partridges 038103 1 39654943 39654943 39654943 39654943.0000
  1832. recruited 038201 1 5987435 5987435 5987435 5987435.0000
  1833. dimensions 038202 1 28357832 28357832 28357832 28357832.0000
  1834. Chicana 038203 1 39654943 39654943 39654943 39654943.0000
  1835. select t3.companynr,fld3,sum(price) from t3,t2 where t2.fld1 = t3.t2nr and t3.companynr = 512 group by companynr,fld3;
  1836. companynr fld3 sum(price)
  1837. 512 boat 786542
  1838. 512 capably 786542
  1839. 512 cupboard 786542
  1840. 512 decliner 786542
  1841. 512 descendants 786542
  1842. 512 dopers 786542
  1843. 512 erases 786542
  1844. 512 Micronesia 786542
  1845. 512 Miles 786542
  1846. 512 skies 786542
  1847. select t2.companynr,count(*),min(fld3),max(fld3),sum(price),avg(price) from t2,t3 where t3.companynr >= 30 and t3.companynr <= 58 and t3.t2nr = t2.fld1 and 1+1=2 group by t2.companynr;
  1848. companynr count(*) min(fld3) max(fld3) sum(price) avg(price)
  1849. 00 1 Omaha Omaha 5987435 5987435.0000
  1850. 36 1 dubbed dubbed 28357832 28357832.0000
  1851. 37 83 Abraham Wotan 1908978016 22999735.1325
  1852. 50 2 scribbled tapestry 68012775 34006387.5000
  1853. select t3.companynr+0,t3.t2nr,fld3,sum(price) from t3,t2 where t2.fld1 = t3.t2nr and t3.companynr = 37 group by 1,t3.t2nr,fld3,fld3,fld3,fld3,fld3 order by fld1;
  1854. t3.companynr+0 t2nr fld3 sum(price)
  1855. 37 1 Omaha 5987435
  1856. 37 11401 breaking 5987435
  1857. 37 11402 Romans 28357832
  1858. 37 11403 intercepted 39654943
  1859. 37 11501 bewilderingly 5987435
  1860. 37 11701 astound 5987435
  1861. 37 11702 admonishing 28357832
  1862. 37 11703 sumac 39654943
  1863. 37 12001 flanking 5987435
  1864. 37 12003 combed 39654943
  1865. 37 12301 Eulerian 5987435
  1866. 37 12302 dubbed 28357832
  1867. 37 12303 Kane 39654943
  1868. 37 12501 annihilates 5987435
  1869. 37 12602 Wotan 28357832
  1870. 37 12603 snatching 39654943
  1871. 37 12701 grazing 5987435
  1872. 37 12702 Baird 28357832
  1873. 37 12703 celery 39654943
  1874. 37 13601 handgun 5987435
  1875. 37 13602 foldout 28357832
  1876. 37 13603 mystic 39654943
  1877. 37 13801 intelligibility 5987435
  1878. 37 13802 Augustine 28357832
  1879. 37 13803 teethe 39654943
  1880. 37 13901 scholastics 5987435
  1881. 37 16001 audiology 5987435
  1882. 37 16201 wallet 5987435
  1883. 37 16202 parters 28357832
  1884. 37 16301 eschew 5987435
  1885. 37 16302 quitter 28357832
  1886. 37 16303 neat 39654943
  1887. 37 18001 jarring 5987435
  1888. 37 18002 tinily 28357832
  1889. 37 18003 balled 39654943
  1890. 37 18012 impulsive 28357832
  1891. 37 18013 starlet 39654943
  1892. 37 18021 lawgiver 5987435
  1893. 37 18022 stated 28357832
  1894. 37 18023 readable 39654943
  1895. 37 18032 testicle 28357832
  1896. 37 18033 Parsifal 39654943
  1897. 37 18041 Punjab 5987435
  1898. 37 18042 Merritt 28357832
  1899. 37 18043 Quixotism 39654943
  1900. 37 18051 sureties 5987435
  1901. 37 18052 puddings 28357832
  1902. 37 18053 tapestry 39654943
  1903. 37 18061 trimmings 5987435
  1904. 37 18062 humility 28357832
  1905. 37 18101 tragedies 5987435
  1906. 37 18102 skulking 28357832
  1907. 37 18103 flint 39654943
  1908. 37 18201 relaxing 5987435
  1909. 37 18202 offload 28357832
  1910. 37 18402 suites 28357832
  1911. 37 18403 lists 39654943
  1912. 37 18601 vacuuming 5987435
  1913. 37 18602 dentally 28357832
  1914. 37 18603 humanness 39654943
  1915. 37 18801 inch 5987435
  1916. 37 18802 Weissmuller 28357832
  1917. 37 18803 irresponsibly 39654943
  1918. 37 18811 repetitions 5987435
  1919. 37 18812 Antares 28357832
  1920. 37 19101 ventilate 5987435
  1921. 37 19102 pityingly 28357832
  1922. 37 19103 interdependent 39654943
  1923. 37 19201 Graves 5987435
  1924. 37 30501 neonatal 5987435
  1925. 37 30502 scribbled 28357832
  1926. 37 30503 chafe 39654943
  1927. 37 31901 realtor 5987435
  1928. 37 36001 elite 5987435
  1929. 37 36002 funereal 28357832
  1930. 37 38001 Conley 5987435
  1931. 37 38002 lectured 28357832
  1932. 37 38003 Abraham 39654943
  1933. 37 38011 groupings 5987435
  1934. 37 38012 dissociate 28357832
  1935. 37 38013 coexist 39654943
  1936. 37 38101 rusting 5987435
  1937. 37 38102 galling 28357832
  1938. 37 38103 obliterates 39654943
  1939. 37 38201 resumes 5987435
  1940. 37 38202 analyzable 28357832
  1941. 37 38203 terminator 39654943
  1942. select sum(price) from t3,t2 where t2.fld1 = t3.t2nr and t3.companynr = 512 and t3.t2nr = 38008 and t2.fld1 = 38008 or t2.fld1= t3.t2nr and t3.t2nr = 38008 and t2.fld1 = 38008;
  1943. sum(price)
  1944. 234298
  1945. select t2.fld1,sum(price) from t3,t2 where t2.fld1 = t3.t2nr and t3.companynr = 512 and t3.t2nr = 38008 and t2.fld1 = 38008 or t2.fld1 = t3.t2nr and t3.t2nr = 38008 and t2.fld1 = 38008 or t3.t2nr = t2.fld1 and t2.fld1 = 38008 group by t2.fld1;
  1946. fld1 sum(price)
  1947. 038008 234298
  1948. explain select fld3 from t2 where 1>2 or 2>3;
  1949. id select_type table type possible_keys key key_len ref rows Extra
  1950. 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
  1951. explain select fld3 from t2 where fld1=fld1;
  1952. id select_type table type possible_keys key key_len ref rows Extra
  1953. 1 SIMPLE t2 ALL NULL NULL NULL NULL 1199
  1954. select companynr,fld1 from t2 HAVING fld1=250501 or fld1=250502;
  1955. companynr fld1
  1956. 34 250501
  1957. 34 250502
  1958. select companynr,fld1 from t2 WHERE fld1>=250501 HAVING fld1<=250502;
  1959. companynr fld1
  1960. 34 250501
  1961. 34 250502
  1962. select companynr,count(*) as count,sum(fld1) as sum from t2 group by companynr having count > 40 and sum/count >= 120000;
  1963. companynr count sum
  1964. 00 82 10355753
  1965. 29 95 14473298
  1966. 34 70 17788966
  1967. 37 588 83602098
  1968. 41 52 12816335
  1969. select companynr from t2 group by companynr having count(*) > 40 and sum(fld1)/count(*) >= 120000 ;
  1970. companynr
  1971. 00
  1972. 29
  1973. 34
  1974. 37
  1975. 41
  1976. select t2.companynr,companyname,count(*) from t2,t4 where t2.companynr=t4.companynr group by companyname having t2.companynr >= 40;
  1977. companynr companyname count(*)
  1978. 68 company 10 12
  1979. 50 company 11 11
  1980. 40 company 5 37
  1981. 41 company 6 52
  1982. 53 company 7 4
  1983. 58 company 8 23
  1984. 65 company 9 10
  1985. select count(*) from t2;
  1986. count(*)
  1987. 1199
  1988. select count(*) from t2 where fld1 < 098024;
  1989. count(*)
  1990. 387
  1991. select min(fld1) from t2 where fld1>= 098024;
  1992. min(fld1)
  1993. 98024
  1994. select max(fld1) from t2 where fld1>= 098024;
  1995. max(fld1)
  1996. 1232609
  1997. select count(*) from t3 where price2=76234234;
  1998. count(*)
  1999. 4181
  2000. select count(*) from t3 where companynr=512 and price2=76234234;
  2001. count(*)
  2002. 4181
  2003. explain select min(fld1),max(fld1),count(*) from t2;
  2004. id select_type table type possible_keys key key_len ref rows Extra
  2005. 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
  2006. select min(fld1),max(fld1),count(*) from t2;
  2007. min(fld1) max(fld1) count(*)
  2008. 0 1232609 1199
  2009. select min(t2nr),max(t2nr) from t3 where t2nr=2115 and price2=823742;
  2010. min(t2nr) max(t2nr)
  2011. 2115 2115
  2012. select count(*),min(t2nr),max(t2nr) from t3 where name='spates' and companynr=78;
  2013. count(*) min(t2nr) max(t2nr)
  2014. 4181 4 41804
  2015. select t2nr,count(*) from t3 where name='gems' group by t2nr limit 20;
  2016. t2nr count(*)
  2017. 9 1
  2018. 19 1
  2019. 29 1
  2020. 39 1
  2021. 49 1
  2022. 59 1
  2023. 69 1
  2024. 79 1
  2025. 89 1
  2026. 99 1
  2027. 109 1
  2028. 119 1
  2029. 129 1
  2030. 139 1
  2031. 149 1
  2032. 159 1
  2033. 169 1
  2034. 179 1
  2035. 189 1
  2036. 199 1
  2037. select max(t2nr) from t3 where price=983543950;
  2038. max(t2nr)
  2039. 41807
  2040. select t1.period from t3 = t1 limit 1;
  2041. period
  2042. 1001
  2043. select t1.period from t1 as t1 limit 1;
  2044. period
  2045. 9410
  2046. select t1.period as "Nuvarande period" from t1 as t1 limit 1;
  2047. Nuvarande period
  2048. 9410
  2049. select period as ok_period from t1 limit 1;
  2050. ok_period
  2051. 9410
  2052. select period as ok_period from t1 group by ok_period limit 1;
  2053. ok_period
  2054. 9410
  2055. select 1+1 as summa from t1 group by summa limit 1;
  2056. summa
  2057. 2
  2058. select period as "Nuvarande period" from t1 group by "Nuvarande period" limit 1;
  2059. Nuvarande period
  2060. 9410
  2061. show tables;
  2062. Tables_in_test
  2063. t1
  2064. t2
  2065. t3
  2066. t4
  2067. show tables from test like "s%";
  2068. Tables_in_test (s%)
  2069. show tables from test like "t?";
  2070. Tables_in_test (t?)
  2071. show full columns from t2;
  2072. Field Type Collation Null Key Default Extra Privileges Comment
  2073. auto int(11) NULL NO PRI NULL auto_increment #
  2074. fld1 int(6) unsigned zerofill NULL NO UNI 000000 #
  2075. companynr tinyint(2) unsigned zerofill NULL NO 00 #
  2076. fld3 char(30) latin1_swedish_ci NO MUL #
  2077. fld4 char(35) latin1_swedish_ci NO #
  2078. fld5 char(35) latin1_swedish_ci NO #
  2079. fld6 char(4) latin1_swedish_ci NO #
  2080. show full columns from t2 from test like 'f%';
  2081. Field Type Collation Null Key Default Extra Privileges Comment
  2082. fld1 int(6) unsigned zerofill NULL NO UNI 000000 #
  2083. fld3 char(30) latin1_swedish_ci NO MUL #
  2084. fld4 char(35) latin1_swedish_ci NO #
  2085. fld5 char(35) latin1_swedish_ci NO #
  2086. fld6 char(4) latin1_swedish_ci NO #
  2087. show full columns from t2 from test like 's%';
  2088. Field Type Collation Null Key Default Extra Privileges Comment
  2089. show keys from t2;
  2090. Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
  2091. t2 0 PRIMARY 1 auto A 1199 NULL NULL BTREE
  2092. t2 0 fld1 1 fld1 A 1199 NULL NULL BTREE
  2093. t2 1 fld3 1 fld3 A NULL NULL NULL BTREE
  2094. drop table t4, t3, t2, t1;
  2095. CREATE TABLE t1 (
  2096. cont_nr int(11) NOT NULL auto_increment,
  2097. ver_nr int(11) NOT NULL default '0',
  2098. aufnr int(11) NOT NULL default '0',
  2099. username varchar(50) NOT NULL default '',
  2100. hdl_nr int(11) NOT NULL default '0',
  2101. eintrag date NOT NULL default '0000-00-00',
  2102. st_klasse varchar(40) NOT NULL default '',
  2103. st_wert varchar(40) NOT NULL default '',
  2104. st_zusatz varchar(40) NOT NULL default '',
  2105. st_bemerkung varchar(255) NOT NULL default '',
  2106. kunden_art varchar(40) NOT NULL default '',
  2107. mcbs_knr int(11) default NULL,
  2108. mcbs_aufnr int(11) NOT NULL default '0',
  2109. schufa_status char(1) default '?',
  2110. bemerkung text,
  2111. wirknetz text,
  2112. wf_igz int(11) NOT NULL default '0',
  2113. tarifcode varchar(80) default NULL,
  2114. recycle char(1) default NULL,
  2115. sim varchar(30) default NULL,
  2116. mcbs_tpl varchar(30) default NULL,
  2117. emp_nr int(11) NOT NULL default '0',
  2118. laufzeit int(11) default NULL,
  2119. hdl_name varchar(30) default NULL,
  2120. prov_hdl_nr int(11) NOT NULL default '0',
  2121. auto_wirknetz varchar(50) default NULL,
  2122. auto_billing varchar(50) default NULL,
  2123. touch timestamp NOT NULL,
  2124. kategorie varchar(50) default NULL,
  2125. kundentyp varchar(20) NOT NULL default '',
  2126. sammel_rech_msisdn varchar(30) NOT NULL default '',
  2127. p_nr varchar(9) NOT NULL default '',
  2128. suffix char(3) NOT NULL default '',
  2129. PRIMARY KEY (cont_nr),
  2130. KEY idx_aufnr(aufnr),
  2131. KEY idx_hdl_nr(hdl_nr),
  2132. KEY idx_st_klasse(st_klasse),
  2133. KEY ver_nr(ver_nr),
  2134. KEY eintrag_idx(eintrag),
  2135. KEY emp_nr_idx(emp_nr),
  2136. KEY wf_igz(wf_igz),
  2137. KEY touch(touch),
  2138. KEY hdl_tag(eintrag,hdl_nr),
  2139. KEY prov_hdl_nr(prov_hdl_nr),
  2140. KEY mcbs_aufnr(mcbs_aufnr),
  2141. KEY kundentyp(kundentyp),
  2142. KEY p_nr(p_nr,suffix)
  2143. ) ENGINE=MyISAM;
  2144. INSERT INTO t1 VALUES (3359356,405,3359356,'Mustermann Musterfrau',52500,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1485525,2122316,'+','','N',1909160,'MobilComSuper92000D2',NULL,NULL,'MS9ND2',3,24,'MobilCom Shop Koeln',52500,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
  2145. INSERT INTO t1 VALUES (3359357,468,3359357,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1503580,2139699,'+','','P',1909171,'MobilComSuper9D1T10SFreisprech(Akquise)',NULL,NULL,'MS9NS1',327,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
  2146. INSERT INTO t1 VALUES (3359358,407,3359358,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1501358,2137473,'N','','N',1909159,'MobilComSuper92000D2',NULL,NULL,'MS9ND2',325,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
  2147. INSERT INTO t1 VALUES (3359359,468,3359359,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1507831,2143894,'+','','P',1909162,'MobilComSuper9D1T10SFreisprech(Akquise)',NULL,NULL,'MS9NS1',327,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
  2148. INSERT INTO t1 VALUES (3359360,0,0,'Mustermann Musterfrau',29674907,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1900169997,2414578,'+',NULL,'N',1909148,'',NULL,NULL,'RV99066_2',20,NULL,'POS',29674907,NULL,NULL,20010202105916,'Mobilfunk','','','97317481','007');
  2149. INSERT INTO t1 VALUES (3359361,406,3359361,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag storniert','','(7001-84):Storno, Kd. möchte nicht mehr','privat',NULL,0,'+','','P',1909150,'MobilComSuper92000D1(Akquise)',NULL,NULL,'MS9ND1',325,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
  2150. INSERT INTO t1 VALUES (3359362,406,3359362,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1509984,2145874,'+','','P',1909154,'MobilComSuper92000D1(Akquise)',NULL,NULL,'MS9ND1',327,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
  2151. SELECT ELT(FIELD(kundentyp,'PP','PPA','PG','PGA','FK','FKA','FP','FPA','K','KA','V','VA',''), 'Privat (Private Nutzung)','Privat (Private Nutzung) Sitz im Ausland','Privat (geschaeftliche Nutzung)','Privat (geschaeftliche Nutzung) Sitz im Ausland','Firma (Kapitalgesellschaft)','Firma (Kapitalgesellschaft) Sitz im Ausland','Firma (Personengesellschaft)','Firma (Personengesellschaft) Sitz im Ausland','oeff. rechtl. Koerperschaft','oeff. rechtl. Koerperschaft Sitz im Ausland','Eingetragener Verein','Eingetragener Verein Sitz im Ausland','Typ unbekannt') AS Kundentyp ,kategorie FROM t1 WHERE hdl_nr < 2000000 AND kategorie IN ('Prepaid','Mobilfunk') AND st_klasse = 'Workflow' GROUP BY kundentyp ORDER BY kategorie;
  2152. Kundentyp kategorie
  2153. Privat (Private Nutzung) Mobilfunk
  2154. Warnings:
  2155. Warning 1052 Column 'kundentyp' in group statement is ambiguous
  2156. drop table t1;
  2157. SHOW STATUS LIKE 'Ssl_cipher';
  2158. Variable_name Value
  2159. Ssl_cipher DHE-RSA-AES256-SHA