I'd appreciate learning how to correctly write a SELECT statement that reports the SUM of one returned column.
I can select all relevant rows, but don't know where to put the SUM(distance) phrase: SELECT l.llid, l.name, s.endKM - s.beginKM AS distance FROM lotic AS l, streamlength AS s WHERE l.llid = s.llid and l.llid = '1226038453652'; I would like SQL to do the work of summing the derived column 'distance' for me. Rich _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users