å³1ããã¼ãã«ã®ã¬ã¤ã¢ã¦ã å³2ããªã¹ã1ã®å®è¡çµæ cust_id | seq | price --------+-----+------- A | 1 | 500 B | 5 | 100 C | 10 | 600 D | 3 | 2000 ãªã¹ã1ããµãã¯ã¨ãªã»ãã©ãã¤ã¢ãæ£è 1å· SELECT R1.cust_id, R1.seq, R1.price FROMReceiptsR1 ï¼â»ï¼ INNER JOIN (SELECT cust_id, MIN(seq) AS min_seq FROMReceipts â» GROUP BY cust_id) R2 ON R1.cust_id = R2.cust_id AND R1.seq = R2.min_seq; â»ãåä¸ãã¼ãã«ãçµåããèªå·±çµå ãã¦ã¯ã¤ãªã¼ããåãªãã©ãããã ããã£ãã¡ãã£ã¨å¾ ã£ã¦ãã ãããæ´çãã¾ãããã®Receip
{{#tags}}- {{label}}
{{/tags}}