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

  • Home
  • SEARCH
  • 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 1057179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T17:49:35+00:00 2026-05-16T17:49:35+00:00

Sorted on column Y X Y Z ———————— | | A1 | | ————————

  • 0

Sorted on column Y

   X       Y        Z 
------------------------
|      |     A1  |     |
------------------------
|      |     B2  |     |
------------------------
|      |     C3  |     |
------------------------ -----Page 1
|      |     D3  |     |
------------------------
|      |     E4  |     |
------------------------
|      |     F5  |     |
------------------------ -----Page 2
|      |     G5  |     |
------------------------
|      |     F6  |     |
------------------------
|      |     G7  |     | -----Page 3  

User has option to enter wild card search, i.e. – “%5“

I would like to return to the user page 2 (as it has the first occurrence of something followed by 5.) OR find out how many rows there are before the column containing F5

(SQLite with C API)

  • 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-16T17:49:36+00:00Added an answer on May 16, 2026 at 5:49 pm

    Assuming MySQL, resultset ordered by X and X is unique:

    SELECT  COUNT(*)
    FROM    mytable
    WHERE   X <
            (
            SELECT  X
            FROM    mytable
            WHERE   y LIKE '%5'
            ORDER BY
                    X
            LIMIT 1
            )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need distinct year and month from date column which would be sorted by
I would like that the Signed button in this JSfiddle sorts the column with
Noob here. I have a super column family sorted by timeuuidtype which has a
I have the following data as input (sorted by first column): foo 1 2
I have a column containing items that can be sorted by the user: DOC_ID
I have a System.Data.DataView object but only want the first ten records, sorted by
Problem: Given a matrix in which each row and each column is sorted, write
using linux commands, I have a quoted csv file which I sorted by first
i have data in a datatable that needs to be sorted on the first
I'm trying to use the indices of a sorted column of a dataset. I

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.