Welcome Guest, Not a member yet? Register   Sign In
convert query to CI 3 query builder
#1

(This post was last modified: 10-04-2022, 11:29 AM by optic4predator1.)

Code:
Hello team i hope you're doing well i have a query which i want to convert to CI 3 query builder

with t as  (
            select    regexp_substr(TAG_ID,'\d',1,level) as ID
                      ,count(*)                          as NUB_of_POSTS
            from      post 
            connect by ID = prior ID and level <= regexp_count(TAG_ID,'\d') and sys_guid() <> prior sys_guid()
            group by  regexp_substr(TAG_ID,'\d',1,level)
          )
select    NAME
          ,NUB_of_POSTS
from      t join tag using(ID)
Reply


Messages In This Thread
convert query to CI 3 query builder - by optic4predator1 - 10-04-2022, 11:28 AM



Theme © iAndrew 2016 - Forum software by © MyBB