thanks gor replay. As attachements you will find 3 files - textBox with properities, same as TableBox and tables schema. Below I paste the script tables.
Best regards and thx for answering.
SQL SELECT Id as Kotly_ID,
kod as Kotly_Kod,
typkotla as IDNagrody,
dataZakupu as Kotly_DataZakupu,
rok as Kotly_Rok,
DataWpisu as Kotly_DataWpisu,
dystrybutor as Kotly_Dystrybutor,
userId as User_ID
SQL SELECT ID as IDNagroda,
Nazwa as IDNagrody,
Opis as Nagrody_Opis,
Foto as Nagrody_Foto,
Punkty as Nagrody_Punkty
SQL SELECT ID as NagrodyZreal_ID,
IDNagrody as IDNagrody,
Rozmiar as NagrodyZreal_Rozmiar,
Punkty as NagrodyZreal_Punkty,
IDUzytkownik as NagrodyZreal_IDUzytk,
Data as NagrodyZreal_Data
SQL SELECT ID as IDNagrody,
NazwaKotla as Punktacja_NazwaKotla,
KodEanKotla as Punktacja_EanKotla,
Punkty as Punktacja_Punkty
SQL SELECT ID as User_ID,
usern as Users_UserName,
passwd as Users_Passwd,
role as Users_Role
SQL SELECT uemail as User_ID,
imie as UsersFull_Imie,
nazwisko as UsersFull_Nazwisko,
sapno as UsersFull_SapNo,
company as UsersFull_Company,
kodpoczt as UsersFull_KodPoczt,
miasto as UsersFull_Miasto,
adres as UsersFull_Adres,
telefon as UsersFull_Telefon
The problem is that the table Punktacja is a reference table like a price list or grade table and doing a sum just on that table will sum up the amounts without respecting how many times it is referred to in the the table Kotly. You should either do a join between the Kotly and Punktacja table in the script or add a quantity column in the Kotly table to get the sum you are looking for.
Out of curiosity Kotly is drum and Punktacja is a grade scale? I'm just wondering how good the polish-english translators are.
yes the Punktacja is a grade scale, but Kotly in this context are boilers (gas boilers I was thinking of).
afterall I wanted to summarize by the points of Kotly for each of users and also get the participation (count) the boilers by type.
Infact I think I'll try to create one more dataset for this purpose. Do you think its better to join the tables or concatenate them??