Need to filter list using max()












0














The thing is, I'm trying to create a table that displays only the max number of votes to a given candidate. For that, it was needed to combine three different tables (this ones are in spanish) Sedes, Candidatos and Voto.
I've got to the point where executing the followning lines, gives me the list with all the total number of votes per candidate per stablishment:



SELECT sedes.nombresede, candidatos.apellido & ", " & candidatos.nombre AS Candidato, count(voto.numcandidato) AS TOTAL
From (Voto INNER JOIN Sedes ON Sedes.sede_id=Voto.sede_id)
INNER JOIN Candidatos ON Voto.numcandidato=Candidatos.numcandidato
GROUP BY nombresede, candidatos.apellido & ", " & candidatos.nombre


Now this is not my end product, what I need is for the list to only show me the candidate in each establishment that's got the maximum ammount of votes. I tried doing this:



SELECT sedes.nombresede, candidatos.apellido & ", " & candidatos.nombre AS Candidato, count(voto.numcandidato) AS TOTAL
From (Voto INNER JOIN Sedes ON Sedes.sede_id=Voto.sede_id)
INNER JOIN Candidatos ON Voto.numcandidato=Candidatos.numcandidato
GROUP BY nombresede, candidatos.apellido & ", " & candidatos.nombre
HAVING max(TOTAL)


But when executing, access prompts me to give a value to TOTAL like when using a parameters clause. As you can see, I also ran into trouble when trying to use Candidato inside the GROUP BY and worked around it by copying the exact expression used in the SELECT clause. Maybe this has something to do with the other problem?



Many, many thanks for all the help!










share|improve this question
























  • Replace COUNT by MAX, ditch your (invalid) HAVING clause and see if gives the desired result.
    – Rene
    Nov 13 '18 at 5:23
















0














The thing is, I'm trying to create a table that displays only the max number of votes to a given candidate. For that, it was needed to combine three different tables (this ones are in spanish) Sedes, Candidatos and Voto.
I've got to the point where executing the followning lines, gives me the list with all the total number of votes per candidate per stablishment:



SELECT sedes.nombresede, candidatos.apellido & ", " & candidatos.nombre AS Candidato, count(voto.numcandidato) AS TOTAL
From (Voto INNER JOIN Sedes ON Sedes.sede_id=Voto.sede_id)
INNER JOIN Candidatos ON Voto.numcandidato=Candidatos.numcandidato
GROUP BY nombresede, candidatos.apellido & ", " & candidatos.nombre


Now this is not my end product, what I need is for the list to only show me the candidate in each establishment that's got the maximum ammount of votes. I tried doing this:



SELECT sedes.nombresede, candidatos.apellido & ", " & candidatos.nombre AS Candidato, count(voto.numcandidato) AS TOTAL
From (Voto INNER JOIN Sedes ON Sedes.sede_id=Voto.sede_id)
INNER JOIN Candidatos ON Voto.numcandidato=Candidatos.numcandidato
GROUP BY nombresede, candidatos.apellido & ", " & candidatos.nombre
HAVING max(TOTAL)


But when executing, access prompts me to give a value to TOTAL like when using a parameters clause. As you can see, I also ran into trouble when trying to use Candidato inside the GROUP BY and worked around it by copying the exact expression used in the SELECT clause. Maybe this has something to do with the other problem?



Many, many thanks for all the help!










share|improve this question
























  • Replace COUNT by MAX, ditch your (invalid) HAVING clause and see if gives the desired result.
    – Rene
    Nov 13 '18 at 5:23














0












0








0







The thing is, I'm trying to create a table that displays only the max number of votes to a given candidate. For that, it was needed to combine three different tables (this ones are in spanish) Sedes, Candidatos and Voto.
I've got to the point where executing the followning lines, gives me the list with all the total number of votes per candidate per stablishment:



SELECT sedes.nombresede, candidatos.apellido & ", " & candidatos.nombre AS Candidato, count(voto.numcandidato) AS TOTAL
From (Voto INNER JOIN Sedes ON Sedes.sede_id=Voto.sede_id)
INNER JOIN Candidatos ON Voto.numcandidato=Candidatos.numcandidato
GROUP BY nombresede, candidatos.apellido & ", " & candidatos.nombre


Now this is not my end product, what I need is for the list to only show me the candidate in each establishment that's got the maximum ammount of votes. I tried doing this:



SELECT sedes.nombresede, candidatos.apellido & ", " & candidatos.nombre AS Candidato, count(voto.numcandidato) AS TOTAL
From (Voto INNER JOIN Sedes ON Sedes.sede_id=Voto.sede_id)
INNER JOIN Candidatos ON Voto.numcandidato=Candidatos.numcandidato
GROUP BY nombresede, candidatos.apellido & ", " & candidatos.nombre
HAVING max(TOTAL)


But when executing, access prompts me to give a value to TOTAL like when using a parameters clause. As you can see, I also ran into trouble when trying to use Candidato inside the GROUP BY and worked around it by copying the exact expression used in the SELECT clause. Maybe this has something to do with the other problem?



Many, many thanks for all the help!










share|improve this question















The thing is, I'm trying to create a table that displays only the max number of votes to a given candidate. For that, it was needed to combine three different tables (this ones are in spanish) Sedes, Candidatos and Voto.
I've got to the point where executing the followning lines, gives me the list with all the total number of votes per candidate per stablishment:



SELECT sedes.nombresede, candidatos.apellido & ", " & candidatos.nombre AS Candidato, count(voto.numcandidato) AS TOTAL
From (Voto INNER JOIN Sedes ON Sedes.sede_id=Voto.sede_id)
INNER JOIN Candidatos ON Voto.numcandidato=Candidatos.numcandidato
GROUP BY nombresede, candidatos.apellido & ", " & candidatos.nombre


Now this is not my end product, what I need is for the list to only show me the candidate in each establishment that's got the maximum ammount of votes. I tried doing this:



SELECT sedes.nombresede, candidatos.apellido & ", " & candidatos.nombre AS Candidato, count(voto.numcandidato) AS TOTAL
From (Voto INNER JOIN Sedes ON Sedes.sede_id=Voto.sede_id)
INNER JOIN Candidatos ON Voto.numcandidato=Candidatos.numcandidato
GROUP BY nombresede, candidatos.apellido & ", " & candidatos.nombre
HAVING max(TOTAL)


But when executing, access prompts me to give a value to TOTAL like when using a parameters clause. As you can see, I also ran into trouble when trying to use Candidato inside the GROUP BY and worked around it by copying the exact expression used in the SELECT clause. Maybe this has something to do with the other problem?



Many, many thanks for all the help!







sql ms-access






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 13 '18 at 19:30









Parfait

49.7k84269




49.7k84269










asked Nov 13 '18 at 1:41









Nico Edu

31




31












  • Replace COUNT by MAX, ditch your (invalid) HAVING clause and see if gives the desired result.
    – Rene
    Nov 13 '18 at 5:23


















  • Replace COUNT by MAX, ditch your (invalid) HAVING clause and see if gives the desired result.
    – Rene
    Nov 13 '18 at 5:23
















Replace COUNT by MAX, ditch your (invalid) HAVING clause and see if gives the desired result.
– Rene
Nov 13 '18 at 5:23




Replace COUNT by MAX, ditch your (invalid) HAVING clause and see if gives the desired result.
– Rene
Nov 13 '18 at 5:23












2 Answers
2






active

oldest

votes


















0














Consider running an aggregate then a correlated subquery for a ranking variable of candidates under each establishment. Then, pick all records with rank = 1:



Helper Query (save as a query object to be referenced below)



SELECT s.nombresede, c.apellido & ', ' & c.nombre AS Candidato, 
COUNT(voto.numcandidato) AS TOTAL
FROM (Voto v
INNER JOIN Sedes s ON s.sede_id = v.sede_id)
INNER JOIN Candidatos c ON c.numcandidato = v.numcandidato
GROUP BY s.nombresede, c.apellido & ', ' & c.nombre


Final Query



SELECT m.nombresede, m.Candidato, m.[rank]
FROM
(SELECT q.nombresede, q.Candidato,
(SELECT COUNT(*)
FROM myHelperQuery sub
WHERE sub.nombresede = q.nombresede
AND sub.TOTAL >= q.TOTAL) AS [rank]
FROM myHelperQuery q
) AS m
WHERE m.[rank] = 1





share|improve this answer





















  • Thank you very much, this solved my problem
    – Nico Edu
    Nov 21 '18 at 20:33



















0














Your TOTAL is not defined. Its not possible to use an Alias this way. So the Max() is trying to evaluate but Access doesnt know what your TOTAL is, so it asks for an input. This one should do the trick:



SELECT sedes.nombresede, candidatos.apellido & ", " & candidatos.nombre AS Candidato, count(voto.numcandidato) AS total, Max(voto.numcandidato) AS maximum
From (Voto INNER JOIN Sedes ON Sedes.sede_id=Voto.sede_id)
INNER JOIN Candidatos ON Voto.numcandidato=Candidatos.numcandidato
GROUP BY nombresede, candidatos.apellido & ", " & candidatos.nombre





share|improve this answer





















  • Thank you for taking your time and answering my question. I see what you mean, but in that case I would need to use a GROUP BY with max(voto.numcandidato) which is wrong. I might have been somewhat confusing when explaining, the thing is when using the very first code I posted Access gives me a complete list with the ammount of votes per candidate in each of the establishments. But I only wish for it to show me the name and votes for the one man who got the most of them...data is stored in the following way: nombresede = name of establishment, sede_id = number of establishment
    – Nico Edu
    Nov 13 '18 at 19:12












  • candidatos.apellido and candidatos.nombre are the surname and name of the candidates respectively, and finally voto.numcandidato is the own personal id that belongs to each candidate. These are all stored in different tables, and used to correlate them with the INNER JOINs used. Hope I've been able to clarify my situation
    – Nico Edu
    Nov 13 '18 at 19:14












  • Ah, ok in this case you can go with the answer from @Parfait.
    – Strawberryshrub
    Nov 14 '18 at 5:57










  • Thank you for your dedication, I've managed to get it going with the help of both of you
    – Nico Edu
    Nov 21 '18 at 20:34











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53272552%2fneed-to-filter-list-using-max%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














Consider running an aggregate then a correlated subquery for a ranking variable of candidates under each establishment. Then, pick all records with rank = 1:



Helper Query (save as a query object to be referenced below)



SELECT s.nombresede, c.apellido & ', ' & c.nombre AS Candidato, 
COUNT(voto.numcandidato) AS TOTAL
FROM (Voto v
INNER JOIN Sedes s ON s.sede_id = v.sede_id)
INNER JOIN Candidatos c ON c.numcandidato = v.numcandidato
GROUP BY s.nombresede, c.apellido & ', ' & c.nombre


Final Query



SELECT m.nombresede, m.Candidato, m.[rank]
FROM
(SELECT q.nombresede, q.Candidato,
(SELECT COUNT(*)
FROM myHelperQuery sub
WHERE sub.nombresede = q.nombresede
AND sub.TOTAL >= q.TOTAL) AS [rank]
FROM myHelperQuery q
) AS m
WHERE m.[rank] = 1





share|improve this answer





















  • Thank you very much, this solved my problem
    – Nico Edu
    Nov 21 '18 at 20:33
















0














Consider running an aggregate then a correlated subquery for a ranking variable of candidates under each establishment. Then, pick all records with rank = 1:



Helper Query (save as a query object to be referenced below)



SELECT s.nombresede, c.apellido & ', ' & c.nombre AS Candidato, 
COUNT(voto.numcandidato) AS TOTAL
FROM (Voto v
INNER JOIN Sedes s ON s.sede_id = v.sede_id)
INNER JOIN Candidatos c ON c.numcandidato = v.numcandidato
GROUP BY s.nombresede, c.apellido & ', ' & c.nombre


Final Query



SELECT m.nombresede, m.Candidato, m.[rank]
FROM
(SELECT q.nombresede, q.Candidato,
(SELECT COUNT(*)
FROM myHelperQuery sub
WHERE sub.nombresede = q.nombresede
AND sub.TOTAL >= q.TOTAL) AS [rank]
FROM myHelperQuery q
) AS m
WHERE m.[rank] = 1





share|improve this answer





















  • Thank you very much, this solved my problem
    – Nico Edu
    Nov 21 '18 at 20:33














0












0








0






Consider running an aggregate then a correlated subquery for a ranking variable of candidates under each establishment. Then, pick all records with rank = 1:



Helper Query (save as a query object to be referenced below)



SELECT s.nombresede, c.apellido & ', ' & c.nombre AS Candidato, 
COUNT(voto.numcandidato) AS TOTAL
FROM (Voto v
INNER JOIN Sedes s ON s.sede_id = v.sede_id)
INNER JOIN Candidatos c ON c.numcandidato = v.numcandidato
GROUP BY s.nombresede, c.apellido & ', ' & c.nombre


Final Query



SELECT m.nombresede, m.Candidato, m.[rank]
FROM
(SELECT q.nombresede, q.Candidato,
(SELECT COUNT(*)
FROM myHelperQuery sub
WHERE sub.nombresede = q.nombresede
AND sub.TOTAL >= q.TOTAL) AS [rank]
FROM myHelperQuery q
) AS m
WHERE m.[rank] = 1





share|improve this answer












Consider running an aggregate then a correlated subquery for a ranking variable of candidates under each establishment. Then, pick all records with rank = 1:



Helper Query (save as a query object to be referenced below)



SELECT s.nombresede, c.apellido & ', ' & c.nombre AS Candidato, 
COUNT(voto.numcandidato) AS TOTAL
FROM (Voto v
INNER JOIN Sedes s ON s.sede_id = v.sede_id)
INNER JOIN Candidatos c ON c.numcandidato = v.numcandidato
GROUP BY s.nombresede, c.apellido & ', ' & c.nombre


Final Query



SELECT m.nombresede, m.Candidato, m.[rank]
FROM
(SELECT q.nombresede, q.Candidato,
(SELECT COUNT(*)
FROM myHelperQuery sub
WHERE sub.nombresede = q.nombresede
AND sub.TOTAL >= q.TOTAL) AS [rank]
FROM myHelperQuery q
) AS m
WHERE m.[rank] = 1






share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 13 '18 at 19:46









Parfait

49.7k84269




49.7k84269












  • Thank you very much, this solved my problem
    – Nico Edu
    Nov 21 '18 at 20:33


















  • Thank you very much, this solved my problem
    – Nico Edu
    Nov 21 '18 at 20:33
















Thank you very much, this solved my problem
– Nico Edu
Nov 21 '18 at 20:33




Thank you very much, this solved my problem
– Nico Edu
Nov 21 '18 at 20:33













0














Your TOTAL is not defined. Its not possible to use an Alias this way. So the Max() is trying to evaluate but Access doesnt know what your TOTAL is, so it asks for an input. This one should do the trick:



SELECT sedes.nombresede, candidatos.apellido & ", " & candidatos.nombre AS Candidato, count(voto.numcandidato) AS total, Max(voto.numcandidato) AS maximum
From (Voto INNER JOIN Sedes ON Sedes.sede_id=Voto.sede_id)
INNER JOIN Candidatos ON Voto.numcandidato=Candidatos.numcandidato
GROUP BY nombresede, candidatos.apellido & ", " & candidatos.nombre





share|improve this answer





















  • Thank you for taking your time and answering my question. I see what you mean, but in that case I would need to use a GROUP BY with max(voto.numcandidato) which is wrong. I might have been somewhat confusing when explaining, the thing is when using the very first code I posted Access gives me a complete list with the ammount of votes per candidate in each of the establishments. But I only wish for it to show me the name and votes for the one man who got the most of them...data is stored in the following way: nombresede = name of establishment, sede_id = number of establishment
    – Nico Edu
    Nov 13 '18 at 19:12












  • candidatos.apellido and candidatos.nombre are the surname and name of the candidates respectively, and finally voto.numcandidato is the own personal id that belongs to each candidate. These are all stored in different tables, and used to correlate them with the INNER JOINs used. Hope I've been able to clarify my situation
    – Nico Edu
    Nov 13 '18 at 19:14












  • Ah, ok in this case you can go with the answer from @Parfait.
    – Strawberryshrub
    Nov 14 '18 at 5:57










  • Thank you for your dedication, I've managed to get it going with the help of both of you
    – Nico Edu
    Nov 21 '18 at 20:34
















0














Your TOTAL is not defined. Its not possible to use an Alias this way. So the Max() is trying to evaluate but Access doesnt know what your TOTAL is, so it asks for an input. This one should do the trick:



SELECT sedes.nombresede, candidatos.apellido & ", " & candidatos.nombre AS Candidato, count(voto.numcandidato) AS total, Max(voto.numcandidato) AS maximum
From (Voto INNER JOIN Sedes ON Sedes.sede_id=Voto.sede_id)
INNER JOIN Candidatos ON Voto.numcandidato=Candidatos.numcandidato
GROUP BY nombresede, candidatos.apellido & ", " & candidatos.nombre





share|improve this answer





















  • Thank you for taking your time and answering my question. I see what you mean, but in that case I would need to use a GROUP BY with max(voto.numcandidato) which is wrong. I might have been somewhat confusing when explaining, the thing is when using the very first code I posted Access gives me a complete list with the ammount of votes per candidate in each of the establishments. But I only wish for it to show me the name and votes for the one man who got the most of them...data is stored in the following way: nombresede = name of establishment, sede_id = number of establishment
    – Nico Edu
    Nov 13 '18 at 19:12












  • candidatos.apellido and candidatos.nombre are the surname and name of the candidates respectively, and finally voto.numcandidato is the own personal id that belongs to each candidate. These are all stored in different tables, and used to correlate them with the INNER JOINs used. Hope I've been able to clarify my situation
    – Nico Edu
    Nov 13 '18 at 19:14












  • Ah, ok in this case you can go with the answer from @Parfait.
    – Strawberryshrub
    Nov 14 '18 at 5:57










  • Thank you for your dedication, I've managed to get it going with the help of both of you
    – Nico Edu
    Nov 21 '18 at 20:34














0












0








0






Your TOTAL is not defined. Its not possible to use an Alias this way. So the Max() is trying to evaluate but Access doesnt know what your TOTAL is, so it asks for an input. This one should do the trick:



SELECT sedes.nombresede, candidatos.apellido & ", " & candidatos.nombre AS Candidato, count(voto.numcandidato) AS total, Max(voto.numcandidato) AS maximum
From (Voto INNER JOIN Sedes ON Sedes.sede_id=Voto.sede_id)
INNER JOIN Candidatos ON Voto.numcandidato=Candidatos.numcandidato
GROUP BY nombresede, candidatos.apellido & ", " & candidatos.nombre





share|improve this answer












Your TOTAL is not defined. Its not possible to use an Alias this way. So the Max() is trying to evaluate but Access doesnt know what your TOTAL is, so it asks for an input. This one should do the trick:



SELECT sedes.nombresede, candidatos.apellido & ", " & candidatos.nombre AS Candidato, count(voto.numcandidato) AS total, Max(voto.numcandidato) AS maximum
From (Voto INNER JOIN Sedes ON Sedes.sede_id=Voto.sede_id)
INNER JOIN Candidatos ON Voto.numcandidato=Candidatos.numcandidato
GROUP BY nombresede, candidatos.apellido & ", " & candidatos.nombre






share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 13 '18 at 5:32









Strawberryshrub

1,1331216




1,1331216












  • Thank you for taking your time and answering my question. I see what you mean, but in that case I would need to use a GROUP BY with max(voto.numcandidato) which is wrong. I might have been somewhat confusing when explaining, the thing is when using the very first code I posted Access gives me a complete list with the ammount of votes per candidate in each of the establishments. But I only wish for it to show me the name and votes for the one man who got the most of them...data is stored in the following way: nombresede = name of establishment, sede_id = number of establishment
    – Nico Edu
    Nov 13 '18 at 19:12












  • candidatos.apellido and candidatos.nombre are the surname and name of the candidates respectively, and finally voto.numcandidato is the own personal id that belongs to each candidate. These are all stored in different tables, and used to correlate them with the INNER JOINs used. Hope I've been able to clarify my situation
    – Nico Edu
    Nov 13 '18 at 19:14












  • Ah, ok in this case you can go with the answer from @Parfait.
    – Strawberryshrub
    Nov 14 '18 at 5:57










  • Thank you for your dedication, I've managed to get it going with the help of both of you
    – Nico Edu
    Nov 21 '18 at 20:34


















  • Thank you for taking your time and answering my question. I see what you mean, but in that case I would need to use a GROUP BY with max(voto.numcandidato) which is wrong. I might have been somewhat confusing when explaining, the thing is when using the very first code I posted Access gives me a complete list with the ammount of votes per candidate in each of the establishments. But I only wish for it to show me the name and votes for the one man who got the most of them...data is stored in the following way: nombresede = name of establishment, sede_id = number of establishment
    – Nico Edu
    Nov 13 '18 at 19:12












  • candidatos.apellido and candidatos.nombre are the surname and name of the candidates respectively, and finally voto.numcandidato is the own personal id that belongs to each candidate. These are all stored in different tables, and used to correlate them with the INNER JOINs used. Hope I've been able to clarify my situation
    – Nico Edu
    Nov 13 '18 at 19:14












  • Ah, ok in this case you can go with the answer from @Parfait.
    – Strawberryshrub
    Nov 14 '18 at 5:57










  • Thank you for your dedication, I've managed to get it going with the help of both of you
    – Nico Edu
    Nov 21 '18 at 20:34
















Thank you for taking your time and answering my question. I see what you mean, but in that case I would need to use a GROUP BY with max(voto.numcandidato) which is wrong. I might have been somewhat confusing when explaining, the thing is when using the very first code I posted Access gives me a complete list with the ammount of votes per candidate in each of the establishments. But I only wish for it to show me the name and votes for the one man who got the most of them...data is stored in the following way: nombresede = name of establishment, sede_id = number of establishment
– Nico Edu
Nov 13 '18 at 19:12






Thank you for taking your time and answering my question. I see what you mean, but in that case I would need to use a GROUP BY with max(voto.numcandidato) which is wrong. I might have been somewhat confusing when explaining, the thing is when using the very first code I posted Access gives me a complete list with the ammount of votes per candidate in each of the establishments. But I only wish for it to show me the name and votes for the one man who got the most of them...data is stored in the following way: nombresede = name of establishment, sede_id = number of establishment
– Nico Edu
Nov 13 '18 at 19:12














candidatos.apellido and candidatos.nombre are the surname and name of the candidates respectively, and finally voto.numcandidato is the own personal id that belongs to each candidate. These are all stored in different tables, and used to correlate them with the INNER JOINs used. Hope I've been able to clarify my situation
– Nico Edu
Nov 13 '18 at 19:14






candidatos.apellido and candidatos.nombre are the surname and name of the candidates respectively, and finally voto.numcandidato is the own personal id that belongs to each candidate. These are all stored in different tables, and used to correlate them with the INNER JOINs used. Hope I've been able to clarify my situation
– Nico Edu
Nov 13 '18 at 19:14














Ah, ok in this case you can go with the answer from @Parfait.
– Strawberryshrub
Nov 14 '18 at 5:57




Ah, ok in this case you can go with the answer from @Parfait.
– Strawberryshrub
Nov 14 '18 at 5:57












Thank you for your dedication, I've managed to get it going with the help of both of you
– Nico Edu
Nov 21 '18 at 20:34




Thank you for your dedication, I've managed to get it going with the help of both of you
– Nico Edu
Nov 21 '18 at 20:34


















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53272552%2fneed-to-filter-list-using-max%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Xamarin.iOS Cant Deploy on Iphone

Glorious Revolution

Dulmage-Mendelsohn matrix decomposition in Python