mysql> select max(Salary) from Salaries where Year=2004;The "mysql>" is the mysql command line prompt. The remainder of the line is the query. In this case, I selected the maximum value for the "Salary" field in the "Salaries" table where the "Year" field is 2004. The table below the query is the result of that query.
+-------------+
| max(Salary) |
+-------------+
| 72000 |
+-------------+
1 row in set (0.02 sec)
mysql> select FirstName, LastName, SalaryThis table joins two tables together, the Salaries table which is where the conditions are being set, and the Players table to get the player's name. More often then not, if there is a PlayerID in a table, this is what one will want to do to make the result something readable to a human.
-> from Salaries left join Players using (PlayerID)
-> where Salary >= 50000 and Year=2004
-> order by Salary desc;
+-----------+----------+--------+
| FirstName | LastName | Salary |
+-----------+----------+--------+
| Roberto | Petagine | 72000 |
| Tuffy | Rhodes | 55000 |
| Norihiro | Nakamura | 50000 |
| Kazuhiro | Sasaki | 50000 |
+-----------+----------+--------+
4 rows in set (0.01 sec)
This is a site about Pro Yakyu (Japanese Baseball), not about who the next player to go over to MLB is. It's a community of Pro Yakyu fans who have come together to share their knowledge and opinions with the world. It's a place to follow teams and individuals playing baseball in Japan (and Asia), and to learn about Japanese (and Asian) culture through baseball.
It is my sincere hope that once you learn a bit about what we're about here that you will join the community of contributors.
Michael Westbay
(aka westbaystars)
Founder
I think all of us would benefit, thank you!