0

I have a All India Village tab file(6Lac records) and an excel which has information on most of those villages(4Lac records).

I want to select 100 villages from a particular state whose area is the highest.

I used the below shown query: enter image description here

But in this query the Area is sorted after selecting first 100 records. I want to select 100 records which have the highest area.

Is there a way the villages are ordered first as per the area and then the selection is carried out?

1 Answer 1

1

You will need to do two queries.

In the first one: Same as yours, but remove "(Rowid<=100) And"

Then, secondly, query the 'Selection' table to show where Rowid<=100

2
  • How to query the selection table? Do I have to save it as a new table first?
    – Divya
    Commented Jun 27, 2016 at 5:24
  • No, you can query the Selection table, or a named query result just like querying a base table Commented Jun 27, 2016 at 8:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.