I am wondering how many subsample ways we have

So far I know two approaches:

1> We can divide the whole sample into two subsamples and run the same main regression equation for these two subsamples and then comparing the coefficients of the variable of interest.

2> We can add the interaction between dummy representing for one subsample and the variable of interest.

I am wondering if we have any other way to do subsample?