# Re: SQL又要如何下??

Posted by jutso on January 13, 1999 at 09:06:17:

In Reply to: SQL又要如何下?? posted by Someone on January 12, 1999 at 13:14:28:

: : 建议你用 sql 先建个表，再交给 crystal 印，不要用 crystal 的 formula ！
: RE:
: 我有试过但选不出我所要的，可能功力不够，那用SQL又要如何下才能选出我要的资料呢？范例或关键的SQL指令...期待!!!

上面的有点错误，改正如下：

query1:
SELECT Last(invoice.date) AS lastdate, invoice.invoiceno
FROM invoice
GROUP BY invoice.invoiceno;

SELECT invoice.*
FROM invoice LEFT JOIN query1 ON invoice.invoiceno = query1.invoiceno
WHERE invoice.date=query1.lastdate;

Follow Ups:

- Re: SQL又要如何下?? JUTSO 09:22:56 1/13/99 (2)
  - *** To JUTSO Someone 15:59:47 1/13/99 (0)
  - *** To JUTSO Someone 15:59:36 1/13/99 (0)