Newpath interview question

write java code for get inventory from sql