Hi @Surendar
Please refer to the following article. It has got examples for all that you want.
Regards, Giri