Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8893107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:09:52+00:00 2026-06-14T23:09:52+00:00

i have this Query : SELECT a.*, a.id AS id_player, (SELECT COUNT(id) FROM `vd7qw_footsal_goals`

  • 0

i have this Query :

SELECT a.*, a.id AS id_player, (SELECT COUNT(id) FROM `vd7qw_footsal_goals` WHERE a.id = id_player AND g.id = id_group) AS goals, 
team.* FROM `vd7qw_footsal_players` AS a 

LEFT JOIN vd7qw_footsal_teams AS team ON team.id= a.id_team

LEFT JOIN vd7qw_footsal_teamofgroup AS tog ON tog.id_team = team.id 4

LEFT JOIN vd7qw_footsal_groups AS g ON g.id = tog.id_group
WHERE g.id IN (SELECT id_group from `vd7qw_footsal_groupofleague` WHERE id_league = 2) 
AND (a.state IN (1)) AND goals > 0 ORDER BY goals DESC

and i want to filter its resaults by players that have goals

the above query have error in this part goals > 0 i don’t know how to do that can any1 help me ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T23:09:53+00:00Added an answer on June 14, 2026 at 11:09 pm

    Try this:

    SELECT * FROM 
    (SELECT a.*, a.id AS id_player, (SELECT COUNT(id) FROM `vd7qw_footsal_goals` WHERE a.id = id_player AND g.id = id_group) AS goals, 
    team.* FROM `vd7qw_footsal_players` AS a 
    
    LEFT JOIN vd7qw_footsal_teams AS team ON team.id= a.id_team
    
    LEFT JOIN vd7qw_footsal_teamofgroup AS tog ON tog.id_team = team.id 4
    
    LEFT JOIN vd7qw_footsal_groups AS g ON g.id = tog.id_group
    WHERE g.id IN (SELECT id_group FROM `vd7qw_footsal_groupofleague` WHERE id_league = 2) 
    AND (a.state IN (1))) AS A WHERE goals > 0 ORDER BY goals DESC
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this query: SELECT COUNT(articles.id) AS count FROM articles, xml_documents, streams WHERE articles.xml_document_id
I have this query: SELECT DISTINCT IM.EDIFICIOS_ID, TI.TITULAR FROM IMPORTACION IM INNER JOIN I_EDIFICIO
I have this such query : SELECT au_lname,der.col FROM authors INNER JOIN (SELECT t.au_id,
I have a very simply query like this: SELECT users.id, COUNT(others.id) as c FROM
I have this query: Select Sysdate,Sum(Count(P.Init_Dtime)) From Player p,player_source ps Where Ps.Group_Id In (44,9,42,15,23,73,45,33,69,63,7,49,96,81,28,57,98,74,92,38)
I have this query: Select Trunc(Create_Dtime),Count(Trunc(Create_Dtime)) as Day_0 From Player Group By Trunc(Create_Dtime) Order
I have this simple query: Select To_Date('2012-sep-03','yyyy-mon-dd')as Date_Of_Concern, Count(Player_Id) as Retained From Player Where
I have a simple query: Select Count(p.Group_ID) From Player_Source P Inner Join Feature_Group_Xref X
I have a query like this: SELECT PlayerID, COUNT(PlayerID) AS MatchesPlayed, Name, Role, Team,
So, I have this mysql query: SELECT member_id, text FROM review WHERE text !=

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.