A quantal hyper-netted chain (HNC) equation for a quantum fluid, which was derived previously by extending Percus' functional expansion method to quantum systems, is shown to be obtained from the Kohn-Sham scheme, which is a method of dealing with an inhomogeneous electron gas in the ground state. This quantal HNC approximation also provides an integral equation for the density distribution n(r|U) induced by imposition of an arbitrary external potential U(r), which is valid in the case of almost constant density. By following the Kohn-Sham scheme, the ground-state energy of an inhomogeneous electron (or neutral) fluid is represented, in terms of the quantal direct correlation function, in the non-local form whose gradient expansion involves all terms of type nabla2k-mn(r)\cdotnablam n(r); this expression results in a new integral equation for n(r|U) , which is applicable to the case of not necessarily almost constant density. In addition, it is shown that any integral equation for n(r|U) in an inhomogeneous system can determine, also, the density-density response function χQ for the homogeneous system in a self-consistent manner; this χQ is to be used again in the integral equation for n(r|U) , which is described in terms of χQ. It should be emphasized that these two integral equations for n(r|U) are applicable to both the charged and neutral fluids at zero or non-zero temperature.