Skip to main content
added 154 characters in body
Source Link

I have a table with the following two columns: about and create_time.

I want to receive a list of rows that are ordered length(about) DESC but only per chunk of time. For example:

If I have the following rows:

about create_time
Hello 1/1/2023-01-01 00:00:00
Hey 1/5/2023-01-05 00:00:00
My name is Daniel 2/1/2023-02-01 00:00:00
Hi 2/8/2023-02-08 00:00:00
HelloWhat's up 3/4/2023-03-02 00:00:00
What's upHello 3/2/2023-03-04 00:00:00
I like to eat 2023-11/5/2022-05 00:00:00

And I want to order them per length of about but only in chunks of last 30 days, I'd expect to get the following:

about create_time
Hello 3/4/2023-03-04 00:00:00
What's up 3/2/2023-03-02 00:00:00
My name is Daniel 2/1/2023-02-01 00:00:00
Hi 2/8/2023-02-08 00:00:00
Hey 1/5/2023-01-05 00:00:00
Hello 1/1/2023-01-01 00:00:00
I like to eat 2023-11/5/2022-05 00:00:00

So they're ordered by length of about me but per chunk of 30 days, starting from now().

I have a table with the following two columns: about and create_time.

I want to receive a list of rows that are ordered length(about) DESC but only per chunk of time. For example:

If I have the following rows:

about create_time
Hello 1/1/2023
Hey 1/5/2023
My name is Daniel 2/1/2023
Hi 2/8/2023
Hello 3/4/2023
What's up 3/2/2023
I like to eat 11/5/2022

And I want to order them per length of about but only in chunks of last 30 days, I'd expect to get the following:

about create_time
Hello 3/4/2023
What's up 3/2/2023
My name is Daniel 2/1/2023
Hi 2/8/2023
Hey 1/5/2023
Hello 1/1/2023
I like to eat 11/5/2022

So they're ordered by length of about me but per chunk of 30 days, starting from now().

I have a table with the following two columns: about and create_time.

I want to receive a list of rows that are ordered length(about) DESC but only per chunk of time. For example:

If I have the following rows:

about create_time
Hello 2023-01-01 00:00:00
Hey 2023-01-05 00:00:00
My name is Daniel 2023-02-01 00:00:00
Hi 2023-02-08 00:00:00
What's up 2023-03-02 00:00:00
Hello 2023-03-04 00:00:00
I like to eat 2023-11-05 00:00:00

And I want to order them per length of about but only in chunks of last 30 days, I'd expect to get the following:

about create_time
Hello 2023-03-04 00:00:00
What's up 2023-03-02 00:00:00
My name is Daniel 2023-02-01 00:00:00
Hi 2023-02-08 00:00:00
Hey 2023-01-05 00:00:00
Hello 2023-01-01 00:00:00
I like to eat 2023-11-05 00:00:00

So they're ordered by length of about me but per chunk of 30 days, starting from now().

added 5 characters in body
Source Link

I have a table with the following two columns: about and create_time.

I want to receive a list of rows that are ordered length(about) DESC but only per chunk of time. For example:

If I have the following rows:

about create_time
Hello 1/1/2023
Hey 1/5/2023
My name is Daniel 2/1/2023
Hi 2/8/2023
Hello 3/4/2023
What's up 3/2/2023
I like to eat 11/5/2022

And I want to order them per length of about but only in chunks of last 30 days, I'd expect to get the following:

about create_time
Hello 3/4/2023
What's up 3/2/2023
My name is Daniel 2/1/2023
Hi 2/8/2023
Hey 1/5/2023
Hello 1/1/2023
I like to eat 11/5/2022

So they're ordered by length of about me but per chunk of 30 days, starting from now().

I have a table with the following two columns: about and create_time.

I want to receive a list of rows that are ordered length(about) DESC but only per chunk of time. For example:

If I have the following rows:

about create_time
Hello 1/1/2023
Hey 1/5/2023
My name is Daniel 2/1/2023
Hi 2/8/2023
Hello 3/4/2023
What's up 3/2/2023
I like to eat 11/5/2022

And I want to order them per length of about but only in chunks of 30 days, I'd expect to get the following:

about create_time
Hello 3/4/2023
What's up 3/2/2023
My name is Daniel 2/1/2023
Hi 2/8/2023
Hey 1/5/2023
Hello 1/1/2023
I like to eat 11/5/2022

So they're ordered by length of about me but per chunk of 30 days, starting from now().

I have a table with the following two columns: about and create_time.

I want to receive a list of rows that are ordered length(about) DESC but only per chunk of time. For example:

If I have the following rows:

about create_time
Hello 1/1/2023
Hey 1/5/2023
My name is Daniel 2/1/2023
Hi 2/8/2023
Hello 3/4/2023
What's up 3/2/2023
I like to eat 11/5/2022

And I want to order them per length of about but only in chunks of last 30 days, I'd expect to get the following:

about create_time
Hello 3/4/2023
What's up 3/2/2023
My name is Daniel 2/1/2023
Hi 2/8/2023
Hey 1/5/2023
Hello 1/1/2023
I like to eat 11/5/2022

So they're ordered by length of about me but per chunk of 30 days, starting from now().

tag, add info from comment
Source Link
Erwin Brandstetter
  • 182.1k
  • 28
  • 457
  • 620

I have a table with the following two columns: about and create_time.

I want to receive a list of rows that are ordered length(about) DESC but only per chunk of time. For example:

If I have the following rows:

about create_time
Hello 1/1/2023
Hey 1/5/2023
My name is Daniel 2/1/2023
Hi 2/8/2023
Hello 3/4/2023
What's up 3/2/2023
I like to eat 11/5/2022

And I want to order them per length of about but only in chunks of 30 days, I'd expect to get the following:

about create_time
Hello 3/4/2023
What's up 3/2/2023
My name is Daniel 2/1/2023
Hi 2/8/2023
Hey 1/5/2023
Hello 1/1/2023
I like to eat 11/5/2022

So they're ordered by length of about me but per chunk of 30 days, starting from now(). I hope this makes sense!

I have a table with the following two columns: about and create_time.

I want to receive a list of rows that are ordered length(about) DESC but only per chunk of time. For example:

If I have the following rows:

about create_time
Hello 1/1/2023
Hey 1/5/2023
My name is Daniel 2/1/2023
Hi 2/8/2023
Hello 3/4/2023
What's up 3/2/2023
I like to eat 11/5/2022

And I want to order them per length of about but only in chunks of 30 days, I'd expect to get the following:

about create_time
Hello 3/4/2023
What's up 3/2/2023
My name is Daniel 2/1/2023
Hi 2/8/2023
Hey 1/5/2023
Hello 1/1/2023
I like to eat 11/5/2022

So they're ordered by length of about me but per chunk of 30 days. I hope this makes sense!

I have a table with the following two columns: about and create_time.

I want to receive a list of rows that are ordered length(about) DESC but only per chunk of time. For example:

If I have the following rows:

about create_time
Hello 1/1/2023
Hey 1/5/2023
My name is Daniel 2/1/2023
Hi 2/8/2023
Hello 3/4/2023
What's up 3/2/2023
I like to eat 11/5/2022

And I want to order them per length of about but only in chunks of 30 days, I'd expect to get the following:

about create_time
Hello 3/4/2023
What's up 3/2/2023
My name is Daniel 2/1/2023
Hi 2/8/2023
Hey 1/5/2023
Hello 1/1/2023
I like to eat 11/5/2022

So they're ordered by length of about me but per chunk of 30 days, starting from now().

fix table format
Source Link
jjanes
  • 41.3k
  • 3
  • 40
  • 54
Loading
Source Link
Loading