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 5977927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:26:28+00:00 2026-05-22T21:26:28+00:00

I need help to write sql query to know avg of position. SELECT p.date_add,

  • 0

I need help to write sql query to know avg of position.

SELECT p.date_add, p.pozycja, f.nazwa FROM fraza f
LEFT JOIN pozycja p ON f.id = p.parent_id
WHERE f.parent_id = 101 AND p.date_add BETWEEN '2010-12-01' AND '2011-01-01'
ORDER BY f.nazwa DESC, p.date_add ASC
LIMIT 1000

now i got something like this:

date_add   |  pozycja(position)  | nazwa(name)
2010-12-01          12               example1
2010-12-01          12               example2
2010-12-01          12               example3
2010-12-01          12               example4
2010-12-01          12               example5
2010-12-02          36               example1
2010-12-02          36               example2
2010-12-02          36               example3
2010-12-02          36               example4
2010-12-02          36               example5

how to get now something like this:

     posisiton    | name
        24         example1
        24         example2
        24         example3
        24         example4
        24         example5

its avg of month name’s position

  • 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-05-22T21:26:28+00:00Added an answer on May 22, 2026 at 9:26 pm
    SELECT p.date_add, avg(p.pozycja) as avg_pozycja, f.nazwa FROM fraza f
    LEFT JOIN pozycja p ON f.id = p.parent_id
    WHERE f.parent_id = 101 AND p.date_add BETWEEN '2010-12-01' AND '2011-01-01'
    GROUP BY f.nazwa
    ORDER BY f.nazwa DESC, p.date_add ASC
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need some help to write some queries. For this sql query (select *
I need to write a SQL-Server query but I don't know how to solve.
Need help from you all in writing up this query. Running SQL 2005 Standard
I need to write an SQL query to take either from one of two
Ok this is driving me nuts, I need to write an SQL query that
I need to write a SQL Query for Advance search form shown as Image
I am a newbee to SQL and need to write a query which seems
I need help writing a T-SQL query that will generate 52 rows of data
I need help with a raw SQL query which gets a value based on
i need help with one more sql query. if i've got 2 columns in

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.