Query Q_tb1I want to create 3 query based on 3 tables
SELECT Tb1.MaID, 1 as ztyp,Da.Ngay, Tb1.GT AS A1
FROM Tb1 INNER JOIN Da ON Tb1.GT = Da.C1
UNION SELECT Tb1.MaID,2, Da.Ngay, Tb1.GT
FROM Tb1 INNER JOIN Da ON Tb1.GT = Da.C2
UNION SELECT Tb1.MaID, 3,Da.Ngay, Tb1.GT
FROM Tb1 INNER JOIN Da ON Tb1.GT = Da.C3
UNION SELECT Tb1.MaID,4, Da.Ngay, Tb1.GT
FROM Tb1 INNER JOIN Da ON Tb1.GT = Da.C4
ORDER BY 1, 2, 3;
TRANSFORM Count(Q_tb1.ztyp) AS [Count-ztyp2]
SELECT Format(Q_tb1.[Ngay],"yyyy") AS wyyyy, (Q_tb1.[A1]\10)*10 AS w2,
Count(Q_tb1.ztyp) AS [count ztyp1]
FROM Q_tb1
GROUP BY Format(Q_tb1.[Ngay],"yyyy"), (Q_tb1.[A1]\10)*10
PIVOT Q_tb1.MaID;
wyyyy | w2 | count ztyp1 | AC1 | AD3 | AL4 | BC2 | LC5 |
---|---|---|---|---|---|---|---|
2021 | 0 | 111 | 80 | 3 | 3 | 13 | 12 |
2021 | 10 | 117 | 5 | 9 | 55 | 48 | |
2021 | 20 | 90 | 30 | 14 | 46 | ||
2021 | 30 | 42 | 42 |
it depends on the conditions of merging tablesFor example: Date 10/3/2021 with 4 values however query with 3 values, etc.
Date 12/3/2021 with 4 values however query with 2 values, etc.
ON Tb1.GT = Da.C1
ON Tb1.GT = Da.C2
ON Tb1.GT = Da.C3
ON Tb1.GT = Da.C4
these are problems due to the DOUBLE data type1. Yes, I did data table by excel.
2. Now, I want to make the data table by query in microsoft access
You can design or organize table to make query in access ?
you use winrar or winzip soft to open itBook2.zip cannot open - error "invalid".
Dear SHANEMAC51,these are problems due to the DOUBLE data type
, they are visually the same, but not equal in reality (a form for comparing 2 tables)
Another VERY helpful thing is to explain abbreviations and acronyms so that is not a barrier to communication.
1. I'm not good at English