Wash and dice the eggplant and place in a colander. Sprinkle well with coarse salt and leave for 30 minutes, then rinse them with cold water well, squeeze then and pat them dry with absorbent kitchen roll. Wash and dice the celery and blanch it in water for 5 minutes then drain. Fry the diced eggplant in plenty of extra-virgin olive oil until golden, then remove them from the oil with a slotted spoon. In a separate frying pan, sauté the sliced onion until golden, then add the celery, olives, capers and pine nuts and let them sauté gently for 5 minutes. Add the peeled tomatoes chopped into small pieces and continue cooking for 10 minutes. Then add fried eggplant, vinegar and sugar and cook for another 10 minutes. Adjust the seasoning and add a few basil leaves. Let the caponata rest and serve cold.