I would create one script to duplicate your data extension, you can use [WSProxy to do this][1] (Retrieve DE info call, Retrieve Fields call then Create DE call) and then [create][2] and [perform][2] query activities via SSJS to fill in the newly created data extension.

Simple example of the create then execute script for Query:

    <script runat="server">
    Platform.Load("Core","1.1") ;
    
    var deName = {{yourTargetDEName}}
    
    var queryName = {{yourQueryName}}
    
    var queryDef = { Name : queryName,
    
    CustomerKey : queryName,
    TargetUpdateType : "Overwrite",
    TargetType : "DE",
    
    Target:{
    Name: deName,
    CustomerKey : deName
    },
    QueryText : "SELECT {{myField}} FROM {{mySourceDE}}"
    };
    
    var status = QueryDefinition.Add(queryDef);
    
    sleep(3000); //Wait for 3 seconds
    //This helps ensure creation is complete before attempting to execute
    
    var qd = QueryDefinition.Init("myQueryDef");
    var status = qd.Perform();
    
    
    function sleep(milliseconds) {
      var start = new Date().getTime();
      for (var i = 0; i < 1e7; i++) {
        if ((new Date().getTime() - start) > milliseconds){
          break;
        }
      }
    }
    </script>


  [1]: https://gortonington.com/wsproxy-to-copy-a-data-extension/
  [2]: https://salesforce.stackexchange.com/questions/227206/creating-query-definition-with-ssjs