2008/12/23 Rachmat Febfauza <mathi...@yahoo.com>: > ================= > > thanks to Simon. it works!!!!. but i have some question. i hope u can help me > to explain these : > > 1. is it necessary or not to specify min(awal1.begin).
No. "Begin" is part of the 'group by' clause. Each distinct value of "Begin" will be represented in the result set. > 2. is "min(strftime("%s",akhir1."End")-strftime("%s",awal1."Begin")) as > Difference" is more time consuming to compute than > "strftime("%s",min(akhir1."End"))-strftime("%s",awal1."Begin") as > Difference". i think these give the same result. Not sure. Can see no reason for there to be a significant performance difference. > 3. akhir1.Category like awal1.Category || '%'. what does it mean? why is use > || '%'???. why not to write "awal1.category = akhir1.category". it also give > the same result. It does not give the same result with your originally posted data set. The like operator matches similar text values; '%' is a wildcard. See http://www.sqlite.org/lang_expr.html#like > > once again, i would say thank you for ur solution. sory for my bad english. > You're welcome, Rgds, Simon _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users