summaryrefslogtreecommitdiff
path: root/mysql-test/xml/tests/sel000003.xml
blob: c9334c972d82069d43403813b2b0dff4a662ce41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?xml version="1.0" standalone="no"?>

<!-- This file is maintained by matt@mysql.com -->

<test name="sel000003">

   <version value="3.22"/>
   <version value="3.23"/>

   <description>This test is just a simple select.</description>
   <description>Testing count() function and GROUP BY clause.</description>

   <sql>DROP TABLE IF EXISTS t</sql>
   <sql>CREATE TABLE t (name CHAR(20) NOT NULL PRIMARY KEY, score SMALLINT NOT NULL, KEY(score))</sql>
   <sql>INSERT INTO t VALUES ('Sasha', 20), ('Matt', 20), ('Monty', 10), ('David', 10), ('Tim', 10), ('Jeremy', 10)</sql>

   <resultfile name="r/3.23/sel000003.result">
        <sql>SELECT COUNT(*) as n, score FROM t GROUP BY score</sql>
   </resultfile>

</test>