Combine data from multiple google sheets and get tab name

Combining data from multiple Google Sheets be achieved through the script but you can also hard code with QUERY and IMPORTRANGE function in Google Sheets and assign the sheet/tab name within each formula set to get the sheet/tab name along with the data set. As a result, you will one extra column as an assigned tab (Column J in the below sheets example). And also excluded the headers to make the formula simpler.