3
Friends, is there any way inside the SQL language (and using mysql BD) where I can start a Select in the middle of a table?
For example, I have 500 addresses in the table. I do a search of Neighborhood X addresses (Where neighborhood="x"), reducing the total to, say, 60 addresses. But I wanted to start the listing from half of those 60 onwards, ignoring the previous ones (even if they were also from the "x" neighborhood). It has as?
Another issue is that I do not know how many values I will have depending on the selected neighborhood, so it may vary. 60, 68, 90 etc. Is there a function within SQL that makes the Select listing start in half (or at any point, for example 1/3, 2/3, 5/6 etc) of a select+Where result?
Thank you very much!
Which columns are in this table?
– EmanuelF
has , use having com Count... https://www.w3schools.com/sql/sql_having.asp
– Marco Souza
Actually there are several columns. I put this example of addresses just to facilitate the explanation of what I’m looking for. It got weird wanting to ignore some addresses ne? hahaha It’s a table with hints. So depending on the variables of Where, the person would receive some tips. But I don’t want to put Rand().
– Peter
Something like, for instance. "Select * from tips Where age>50 AND Sex=1.
– Peter
Marconcilio... now I understand your suggestion better! I’ll try! Thank you!!!
– Peter
The having Count didn’t help. In the example I quoted in my comment above, for example, I don’t know where I could put it to start from some point in the listing.
– Peter