write app data query