Hello @Mario_Orozco_Gonzalez, welcome to the MongoDB forum!
You can run this query from mongo shell, to get the desired result:
// Create the collection with documents
db.products.insertMany([
{ id: 1, category: "Pantalon", buy: 400, sell: 300, status: "a" },
{ id: 2, category: "Camisa", buy: 300, sell: 400, status: "a" },
{ id: 3, category: "Gorra ", buy: 200, sell: 100, status: "a" },
{ id: 4, category: "Gafas ", buy: 100, sell: 200, status: "a" }
])
// Query the collection
db.products.find( { $expr: { $gt: [ "$buy", "$sell" ] } } )
Please refer the MongoDB Manual about the commands and operators used in the above query.