• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

SQL question -- is it possible to do this?

 
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

mysql> select a.ip,name,time,sum(hits) from table1 a left join table2 b on a.ip=
b.ip group by a.ip,a.name;

mysql> select a.ip,name,time,sum(hits) from table1 a left join table2 b on a.ip=
b.ip where time>'2001' OR time=null group by a.ip,a.name;
[ edited to preserve formatting using the [code] and [/code] UBB tags -ds ]
[ July 18, 2003: Message edited by: Dirk Schreckmann ]
 
Ken Shamrock
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please read the question in this link as the above is hard to read:
http://www.hk3s.com/db.txt
 
Police line, do not cross. Well, this tiny ad can go through:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic