![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 11 Pomógł: 0 Dołączył: 21.11.2006 Ostrzeżenie: (0%) ![]() ![]() |
Zapytanie powinno zwracać:
- dane wszystkich userów users_data.* - sumę punktów zdobytych przez usera w danym teście SUM(users_asks.point)+SUM(answers.point), lub NULL jeśli user testu nie wypełniał - maksymalną sumę punktów jaką user mógł zdobyć w danym teście Macie jakieś pomysły? (IMG:http://forum.php.pl/style_emoticons/default/winksmiley.jpg) Kombinuję w ten sposób:
(IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif) (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif) Ten post edytował Anna 16.03.2007, 17:38:56 |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 11 Pomógł: 0 Dołączył: 21.11.2006 Ostrzeżenie: (0%) ![]() ![]() |
(IMG:http://bobola.net.pl/test3.png)
oczekiwane wyniki: -------------------------------------------------------------------------- users_data.* |suma |max -------------------------------------------------------------------------- 1 | Tester | Testowicz | NULL | NULL | 2 | 2 1 | Tester | Testowicz | NULL | NULL | 1 | 2 2 | Marek | Konrad | marek@konrad.pl | NULL | NULL | NULL -------------------------------------------------------------------------- Można też podejść do tematu inaczej i do testu dołączyć usera z wynikami: -------------------------------------------------------------------------------------------- test.name | users_data.firstname | users_data.surname | suma | max -------------------------------------------------------------------------------------------- test nr 1 | Tester | Testowicz | 2 | 2 test nr 2 | Tester | Testowicz | 1 | 2 -------------------------------------------------------------------------------------------- Ten post edytował Anna 16.03.2007, 17:43:45 |
|
|
![]() ![]() |
![]() |
Aktualny czas: 9.10.2025 - 12:50 |