hello,
i know the what i want to do, is the opposite of 3ed noraml Form DB. but this is my case!
i have table costemers. includes "name" column
i have talbe orders. includes "date" and "amount" column
i would like to read costerms who thier name starts with 'm' and i want to read in the same time thier last order date.
in simple model i will get something like this.
---------------------------
nr name date ammount
1 maximi 1.1.2004 20
2 maximi 1.2.2004 4000
3 maximi 1.3.2004 100
4 mand 5.3.2004 1000
5 mand 1.2.2004 28
---------------------------
what i really want to have is :
---------------------------
nr name date ammount
1 maximi 1.3.2004 100
2 mand 5.3.2004 1000
---------------------------
i mean for each user one row including the date of the last order. i have ofcourse the proper PKs and FKs.
can i do that at all in one sql statement?
regards.
sako.
i know the what i want to do, is the opposite of 3ed noraml Form DB. but this is my case!
i have table costemers. includes "name" column
i have talbe orders. includes "date" and "amount" column
i would like to read costerms who thier name starts with 'm' and i want to read in the same time thier last order date.
in simple model i will get something like this.
---------------------------
nr name date ammount
1 maximi 1.1.2004 20
2 maximi 1.2.2004 4000
3 maximi 1.3.2004 100
4 mand 5.3.2004 1000
5 mand 1.2.2004 28
---------------------------
what i really want to have is :
---------------------------
nr name date ammount
1 maximi 1.3.2004 100
2 mand 5.3.2004 1000
---------------------------
i mean for each user one row including the date of the last order. i have ofcourse the proper PKs and FKs.
can i do that at all in one sql statement?
regards.
sako.