At 17:37 -0700 8/14/02, Richard Baskett wrote: >Is there a way to combine these queries? > >SELECT count(SeekID) FROM Seekers >WHERE DateLastLog<NOW() AND DateLastLog>(NOW()-INTERVAL 7 DAY) > >SELECT count(SeekID) FROM Seekers >WHERE DateLastLog<NOW() AND DateLastLog>(NOW()-INTERVAL 1 MONTH) > >Or these? > >SELECT count(ResumeID) FROM Resumes WHERE testResume='1' > >SELECT count(ResumeID) FROM Resumes WHERE HighRank='1' > >I've tried a bunch of different group by's but to no avail..
For something like this you want UNION, available in MySQL 4. Otherwise, you should create a temporary table and then use INSERT INTO ... SELECT a couple of times. > >Also I think I might start looking for a sql/mysql book in the near future >since there is a lot I am realizing I do not know about sql statements. Are >there any that you really really like? I know MySQL 4.0 will be out >eventually.. are there any MySQL 4.0 books that people like or should I >stick with 3.23 books? 4.0 is out now in alpha, and about to go beta with 4.0.3. > >Cheers! > >Rick --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php