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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T05:24:49+00:00 2026-06-15T05:24:49+00:00

For displaying the total page number count I need also to retrieve total number

  • 0

For displaying the total page number count I need also to retrieve total number of results at the below query. How can I do that ?

Thank you

select 
    AvgLevel, TotalCount, PokemonId, Type1, Speed, MonsterTotalStats 
from 
   (select 
       row_number() over (order by tblPokedex.PokemonId asc) rowNumber,
       AvgLevel, TotalCount, tblPokedex.PokemonId, 
       Type1, tblPokedex.Speed, MonsterTotalStats
    from 
       tblPokemonStats, tblAvailablePokemons, tblPokedex 
    left join 
       tblUsersPokemons on tblPokedex.PokemonId = tblUsersPokemons.PokemonId  
    where 
       tblPokemonStats.PokemonId = tblPokedex.PokemonId 
       and tblPokedex.Class = 'emissary' 
    group by 
       tblPokedex.PokemonId, tblPokedex.Type1, tblPokedex.Speed, 
       tblPokemonStats.AvgLevel, tblPokemonStats.TotalCount, MonsterTotalStats 
   ) result 
where 
    result.rowNumber > 0 and result.rowNumber < 101
  • 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-15T05:24:50+00:00Added an answer on June 15, 2026 at 5:24 am

    Just add column Count(*) over():

    ..... 
    select row_number() 
    over (order by tblPokedex.PokemonId asc) rowNumber,
    AvgLevel,
    Count(*) over() as TotalCount,
    .......
    

    see example

    select 
    AvgLevel,TotalCount,PokemonId,Type1,Speed,MonsterTotalStats, TOTALRECORDCOUNT
    from (
    select row_number() 
    over (order by tblPokedex.PokemonId asc) rowNumber,AvgLevel,TotalCount,tblPokedex.PokemonId,Type1,tblPokedex.Speed,MonsterTotalStats,
    count(*) over() as TOTALRECORDCOUNT
    from tblPokemonStats,tblAvailablePokemons,tblPokedex left join tblUsersPokemons on tblPokedex.PokemonId=tblUsersPokemons.PokemonId  
    where tblPokemonStats.PokemonId=tblPokedex.PokemonId and tblPokedex.Class='emissary' 
    group by tblPokedex.PokemonId,tblPokedex.Type1,tblPokedex.Speed,tblPokemonStats.AvgLevel,tblPokemonStats.TotalCount,MonsterTotalStats 
    )  
    result where result.rowNumber>0 and result.rowNumber<101
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a PHP page displaying the results of a MySQL query. It adds
Displaying total number as text for multiple pins at the same location in map
I am creating a report. In that I am displaying total no of leads,
I'm displaying 10 records per page. The variables I have currently that I'm working
I have a form that calculates a total number using Javascript. The code for
I have an addthis plugin for displaying total number of tweets in my blogspot
I am displaying the iframe in wordpress page template. In iframe src i have
I am displaying WordPress content on a static HTML page, which is outside of
I have a couple of blocks on a page that list content such as
While displaying the download status in a window, I have information like: 1) Total

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.